# Thread: Combine and Simplify Equation

1. ## Combine and Simplify Equation

Hi Guys,

I'm newbie in this forum. Pardon me if this thread not in appropriate sub forum.
I have SSIM algorithm. I want to derive this algorithm.
$\mu_x$ for average x
$\sigma_x$ for variance x
$\sigma_{xy}$ for covariance x

$l(x,y) = \frac{2\mu_x\mu_y + c_1}{\mu_x^2 + \mu_y^2 + c_1}
$

$r(x,y) = \frac{2\sigma_x\sigma_y + c_2}{\sigma_x^2 + \sigma_y^2 + c_2}$

$r(x,y) = \frac{2\sigma_{xy} + c_2}{2\sigma_x\sigma_y + c_2}$

To be like this

$SSIM(x,y) = \frac{(2\mu_x\mu_y + c_1)(2\sigma_{xy} + c_2)}{(\mu_x^2 + \mu_y^2 + c_1)(\sigma_x^2 + \sigma_y^2 + c_2)}$

Thank you.

2. Originally Posted by dhany19
Hi Guys,

I'm newbie in this forum. Pardon me if this thread not in appropriate sub forum.
I have SSIM algorithm. I want to derive this algorithm.
$\mu_x$ for average x
$\sigma_x$ for variance x
$\sigma_{xy}$ for covariance x

$l(x,y) = \frac{2\mu_x\mu_y + c_1}{\mu_x^2 + \mu_y^2 + c_1}
$

$r(x,y) = \frac{2\sigma_x\sigma_y + c_2}{\sigma_x^2 + \sigma_y^2 + c_2}$

$r(x,y) = \frac{2\sigma_{xy} + c_2}{2\sigma_x\sigma_y + c_2}$

To be like this

$SSIM(x,y) = \frac{(2\mu_x\mu_y + c_1)(2\sigma_{xy} + c_2)}{(\mu_x^2 + \mu_y^2 + c_1)(\sigma_x^2 + \sigma_y^2 + c_2)}$

Thank you.
I am not an optic engineer, but I found the definition of SSIM.

Definition says SSIM(x,y) = L(x,y)C(x,y)S(x,y) where

$L(x,y) = \frac{2\mu_x\mu_y + c_1}{\mu_x^2 + \mu_y^2 + c_1}
$

$C(x,y) = \frac{2\sigma_x\sigma_y + c_2}{\sigma_x^2 + \sigma_y^2 + c_2}$

$S(x,y) = \frac{2\sigma_{xy} + c_2}{2\sigma_x\sigma_y + c_2}$
$SSIM(x,y) = \frac{(2\mu_x\mu_y + c_1)<2\sigma_{x}\sigma_y + c_2>}{(\mu_x^2 + \mu_y^2 + c_1)(\sigma_x^2 + \sigma_y^2 + c_2)}\frac{(2\sigma_{xy} + c_2)}{<2\sigma_x\sigma_y + c_2>}$

where the <> canceled out. Only you would know how the Stabilizer Constant and Dynamic Range come about.

You can post your question at the physics forum. There are people there who can help you.