I am working on an algorithm where I need to normalize the number of keypoints discovered in the image using the feature detector. My image could be very textured or very flat (solid colored). The algorithm I am trying to device will need a measure of the number of keypoints discovered in the interval [0,1]. The ratio will be computed from the number of keypoints discovered divided by the number of possible keypoints in the image. Can someone suggest the upper bound on the number of keypoints in an arbitrary image?