I want to take the color histogram value of sourcode below:
description $ WR = array (48 reference colors r)
$emin = sqrt(pow(($r - $wr[0]),2) + pow(($g - $wg[0]),2) + pow(($b -$wb[0]),2));
for($k=1;$k<48;$k++)
{
$e = sqrt(pow(($r - $wr[$k]),2) + pow(($g - $wg[$k]),2) + pow(($b -$wb[$k]),2));
if ($e < $emin)
{
$n = $k;
$emin = $e;
}
}**
which I ask where to obtain the variable $ h as well as what should I do with a value of $ n and $ Emin:
**/ / Snippet get the color histogram
$tothis=0;
for($i=0;$i<48;$i++)
{
//to get total value image
$tothis = $tothis + $his[$i];
}
for($i=0;$i<48;$i++)
{
//to get PDF
$his[$i] = $his[$i] / $tothis;
}**
Thank you all for your help ...