Fuzzy set theory has been successfully applied to many image processing and pattern recognition tasks. In order to use the fuzzy logic approach, membership functions for fuzzy sets must be determined first. Because many properties of images, such as brightness of graylevels, are strongly context dependent, it is not easy to determine the membership function correctly. In this paper, the fuzzy set ''brightness of graylevels'' of an image is used as an example to illustrate how the membership function can be determined automatically. We start with the concept of fuzzy event and use the maximum entropy principle as the criterion to find a membership function which will best represent the membership of brightness for each graylevel in an image. That is, the membership function is determined by finding a membership function such that the corresponding fuzzy event has maximum entropy. The membership of brightness can be represented by an S-function, whose shape can be determined by the parameters a, b, and c. The problem becomes to find a best parameter combination (a(opt), b(opt), c(opt)), which is a combinatorial optimization problem. The simulated annealing algorithm is used to solve this problem in this paper. We have done the experiments on several images. The results have shown that the proposed method can automatically and effectively find the brightness membership function for images. The robustness of the proposed algorithm is also proved by the experiments. Though we used image processing as the application domain of the proposed approach, the basic idea can be extended to other applications easily. (C) Elsevier Science Inc. 1997