image = | pearsonColocalization2dImg (inImg1,inImg2) |
builds the Pearson's colocalization map computing the Pearson correlation coefficient on each pixel
The Pearson colocalization, also known as Pearson correlation coefficient, is a linear correlation measure between the two input images InImg1 and InImg2. The result is a Real32 image where the intensity
at the pixel at position
is calculated with the following formula :
Where
is the mean intensity of
and
is its standard deviation.
Here is an example of Pearson colocalization mapping:
- See also
- https://en.wikipedia.org/wiki/Pearson_correlation_coefficient
Example of Python code :
Example imports
import PyIPSDK
import PyIPSDK.IPSDKIPLFiltering as filter
Code Example
outAutoImg = filter.pearsonColocalization2dImg(inImg1, inImg2)
outImg = PyIPSDK.createImage(PyIPSDK.eImageBufferType.eIBT_Real32, inImg1.getSizeX(), inImg1.getSizeY())
filter.pearsonColocalization2dImg(inImg1, inImg2, outImg)
Example of C++ code :
Example informations
Header file
#include <IPSDKIPL/IPSDKIPLFiltering/Processor/PearsonColocalization2dImg/PearsonColocalization2dImg.h>
Code Example
ImagePtr pAutoOutImg = pearsonColocalization2dImg(pInImg1, pInImg2);
boost::shared_ptr<MemoryImage> pOutImg(boost::make_shared<MemoryImage>());
pOutImg->init(*pOutputImageGeometry);
pearsonColocalization2dImg(pInImg1, pInImg2, pOutImg);