# Determining Parameters of S Function for Image Global Contrast Enhancement

I know that S-function (membership function from fuzzy set theory) is a commonly used function for image enhancement. I am reading a paper titled - A Novel Fuzzy Image Enhancement Using S-Shaped Membership Function. The S-shaped membership function is defined as follows:

$$\begin{eqnarray*} S(x;a,b,c)=\begin{cases} 0, & x\leq a\\ \frac{(x-a)^2}{(b-a)(c-a)}, & ac. \end{cases} \end{eqnarray*}$$

where the parameters are to be found. In the above mentioned paper, it given that the values of a, b, c are entropy(I), median(I) and (max(I)+mean(I))/2 respectively. But there's no explanation for how and why these values were chosen. I tried to look for it in many papers referred by the above paper but they are of no use. Can someone give me some idea please? Thank you in advance.

## bumped to the homepage by Community♦20 hours ago

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

• a more general term for this is Sigmoid function. and scaled the way yours is to go from 0 to 1, it's probably another version of a smoothstep function. – robert bristow-johnson Jan 18 at 18:44
• thanks @OlliNiemitalo for finding the pdf of the paper. the OP did copy Eq (4) over correctly, but i am suspicious that the definition is wrong because it does not appear to be continuous at $x=c$. when $x=c$, then $$S(x) = 1 - \frac{c-a}{c-b} \ne 1$$ when $x$ is slightly larger than $c$, then $S(x)=1$. – robert bristow-johnson Jan 18 at 20:18
• it maybe should be $$S(x;a,b,c)=\begin{cases} 0, & x\leq a\\ \frac{(x-a)^2}{(b-a)(c-a)}, & a<x\leq b\\ 1-\frac{(x-c)^2}{(c-b)(c-a)} & b\leq x\leq c\\ 1, & x>c. \end{cases}$$ i am not sure. to be a decent Sigmoid function, it should be continuous everywhere and also the first derivative should be continuous everywhere. – robert bristow-johnson Jan 18 at 20:21

Okay, I am convinced that there is a typo in Eq. (4) of the cited paper. It should be:

$$S(x;a,b,c)=\begin{cases} 0 & x\leq a\\ \frac{(x-a)^2}{(b-a)(c-a)} & ac \end{cases}$$

This sigmoid function or smoothstep function is continuous everywhere and the first derivative is continuous everywhere, but the second derivative is discontinuous when $$x=a$$ or $$x=b$$ or $$x=c$$.

You must have $$a < b < c$$.

$$a$$ is defined where $$S(x)$$ begins to transition from 0 upward. and $$c$$ is defined for when the transition is over and $$S(x)=1$$. $$b$$, which is in between $$a$$ and $$c$$ is the point of inflection for when the curvature changes from a concave curvature to a convex curvature (or maybe it's the other way around).

There are better sigmoid or smoothstep functions than this that the author of the paper uses. I dunno why he/she is so enamored with this definition.

• Thank you so much for your response. Sir, I want how the parameters are determined. Can you help on this please? – shwetha Jan 20 at 10:50
• from what data would you want to fit the parameters? If $b$ is half-way between $a$ and $c$, then the curve is symmetric about the point of inflection. Where to put $a$ and $c$ depends on the values of $x$ where you want the sigmoid function to kick in and where on the $x$-axis you want the sigmoid function to finish and be flat again. – robert bristow-johnson Jan 21 at 9:57
• my exact question is, how do you decide that choosing such a parameter will enhance the given image? – shwetha Jan 23 at 10:45