Soil texture analysis is crucial for crop selection, fertilizer recommendation, and production. Traditional soil testing in the lab using chemicals is highly time-consuming, expensive, and risky harmful chemicals; proper equipment and trained professionals are required to get the readings and to conduct the analysis. These issues can be resolved using image processing. In this study, we proposed a Blackbox prototype machine to take images in a controlled environment under the fixed intensity of light, distance, and standard dry conditions to analyze soil texture. This innovative machine, with its efficient and precise image processing capabilities, has the potential to revolutionize soil texture analysis. Also, we marked the center points of each type of soil texture as defined in the USDA texture triangle. Hundreds of soil samples were prepared for each type according to the center point's sand, silt, and clay ratio. The image processing-based model is trained for texture analysis. This research aims to reduce the soil texture analysis time and provide a system that can do extensive analyses automatically and with accuracy. The proposed Blackbox prototype machine has proven effective in providing a controlled environment for taking images. Also, the proposed model detects soil texture with a maximum accuracy of 99.5 %. A proposed model trained on the soil samples of different texture classes available in the USDA texture triangle accurately performed texture analysis. The results benefit the recommendation of appropriate crops and fertilizers based on a given soil sample in a very short time and cost-effectively.