In this paper we propose an image analysis method for detecting and counting tomato flowers from images taken in a greenhouse. Detecting and locating flowers is useful information for tomato growers and breeders, for phenotyping, yield prediction, and for automating procedures such as pollination and spraying. Since the tomato flowers are yellow, we first apply a set of grayscale transformations in which yellow regions stand out, and then threshold and combine them by a logical binary AND operation. Using more than one transform reduces the possibility of spurious detections due to non-flower regions of the image appearing yellow due to illumination conditions. Connected regions larger than a certain threshold are selected as instances belonging to the class flower. Experimental results over images acquired in a greenhouse using a Realsense camera show that this approach could detect flowers with a recall of 0.79 and precision of 0.77, which are comparable to the values reported in literature with higher resolution cameras closer to the flowers being imaged.