Since iron ore does not have high added value as a raw material, processing it, increases the added value and also creates jobs. One step of the process is pelleting. Pellets are balls made of a mixture of iron ore and other materials along with water that is cooked in the furnace. In recent years, the industrial use of image processing has increased impressively. Mobarakeh Steel Complex, as the largest producer in the Middle East with an annual capacity of more than 7 million tons of pellets, has decided to use image processing for the pelletizing of green pellets in its pelleting unit. As the green pellets should have a desired diameter of 9 to 16 mm, and pellets with smaller or larger dimensions and are returned to the pellet production process. Using a suitable method for the size of the pellets and improving the production process accordingly can greatly reduce the production of unfriendly sized pellets, which saves energy and lowers the cost of production. The purpose of this research is to obtain the diameter of the green pellets in Mobarakeh Steel Complex. In doing so, we face a number of challenges, such as the presence of water vapor on the surface of the pelletizing discs, especially in the cold seasons, shading, clinging and overlapping of the pellets, which prevent the desired result. Eventually, using morphological tools, non-local dehazing method, and region-based active contours, we were able to find a desirable method for dimensioning images in which the ratio of the pixel of the pellet to the total image pixels is less than 0.565. With this method, we achieved an average of 90.55\\% in the detection of the number of pellets in the image. Also, accuracy for size measurement is above 80\\%. Using these values and the ROC curve, we reached a value of 0.9171 in the prediction power of the algorithm. Key words: Pelletizing, Image Processing, Size Measurement, Dehaze.