Abstract. As pigs are usually sold by their weights, the weighing process plays an important role. Traditional approaches include manually weighing pigs in the actual farm environment, which can be a slow and stressful task due to the movement of the pigs in a crowded space. Moreover, the imprecision of the weights adds to this problem. Hence, an automatic approach is needed. However, existing automated procedures also suffer from issues like the imprecision caused by the pig movements, low light intensity, low ceiling in the farm environment for proper installation of a camera. To overcome these problems, this article presents a semi-automatic machine vision approach for pig weight estimation in an actual farm environment with a high number of pigs per pen, cloudy image background, and natural movement of the pigs. Commercial mechanical weight scales with radio-frequency identification (RFID) exist to deal with automatic pig weight monitoring for each stall. However, from an economic perspective, they are too expensive to employ in developing countries such as Thailand. The primary purpose of this study is to tackle the problem of cost. A low-cost closed-circuit television (CCTV) was exploited, and open-source software was adopted. Pig images were taken from the top view of the feeder. The developed software was equipped with camera calibration for the distortion elimination process, pig boundary detection for the feature extraction process, and artificial neural network for pig weight estimation. The experimental evaluation results showed the benefits and practicality of the proposed approach, which led to a low absolute mean error of 2.84%, a short model training time of approximately 5 seconds, and a short prediction time of 7.18 milliseconds. Keywords: Artificial intelligence, Image processing, Multilayer perceptron, Pig weight estimation system, Smart agriculture.