Pixels2d = | locatePixels2d (inBinImg) |
Pixels2d = | locatePixels2d (inBinImg,inNbPoints) |
Build the list of the coordinates of the pixels with a value of True in the input binary image.
Given an input binary image, this algorithm lists the inNbPoints first pixels where the values are true in the binary image.
Here is an example of result on a 10x10 binary image :
Example of Python code :
Example imports
import PyIPSDK
import PyIPSDK.IPSDKIPLGlobalMeasure as glbmsr
Code Example
pixels2d = glbmsr.locatePixels2d(inImg, 10)
Example of C++ code :
Example informations
Header file
#include <IPSDKIPL/IPSDKIPLGlobalMeasure/Processor/LocatePixels2d/LocatePixels2d.h>
Code Example
Pixels2dPtr pPixels = locatePixels2d(pInBinImg, nbMaxPixels);