Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

if you look e.g. here, we got:

image description

Mat squared; 
Core.multiply(gl, gl, squared);
double energy = Core.sum(squared)[0];

image description

Mat ln; cv::log(gl, ln);
Mat squared; 
Core.multiply(ln, g, squared, -1);
double entropy = Core.sum(squared)[0];

... and so on ...

if you look e.g. here, we got:

image description

Mat squared; 
Core.multiply(gl, gl, squared);
double energy = Core.sum(squared)[0];

image description

Mat ln; cv::log(gl, ln);
Mat squared; 
Core.multiply(ln, g, gl, squared, -1);
double entropy = Core.sum(squared)[0];

... and so on ...

if you look e.g. here, we got:

image description

Mat squared; 
Core.multiply(gl, gl, squared);
Scalar sum = Core.sumElems(squared);
double energy = Core.sum(squared)[0];
sum.val[0];

image description

Mat ln; cv::log(gl, 
Core.log(gl, ln);
Mat squared; 
Core.multiply(ln, gl, squared, -1);
Scalar sum = Core.sumElems(squared);
double entropy = Core.sum(squared)[0];
sum.val[0];

... and so on ...