One of the main concerns of greenhouse growers is the cost for labor-intensive tasks including planting, monitoring, spraying and most importantly harvesting. Within the last two decades, there have been great efforts for developing automatic harvesting robots, but they are not commercialized yet. There is a need to conduct further research about different aspects of robots. Machine vision is one major aspect of a harvesting robot, and generally is inseparable part of robot automation. The main objective of this study was to develop a vision system that is simple, low-cost but effective with a reasonable accuracy for detecting bell pepper in greenhouse. Green bell pepper was chosen not only for its nutrient importance but also for its challenging segmentation due to color similarity between samples of interest and leaves. To overcome this challenge, images were firstly segmented into objects. In the next step, texture characteristic as one of the object-based features was utilized to segment objects into smooth and rough classes. Categorized smooth objects were then classified into plant and non-plant regions using adjusted thresholds of color indices of hue, saturation and Excessive Green Index (EGI). This approach produced promising classification results on images taken under natural light for ultimate purpose of automatic harvesting. The algorithm could recognize 94 out of 108 (detection accuracy of 87%) bell peppers located within workspace of robot.