ClearImage .NET API
CountPixels Method (CiTools)
Example 





Inlite.ClearImage Namespace > CiTools Class : CountPixels Method
Count image pixels
Syntax
'Declaration
 
Public Function CountPixels() As System.Integer
'Usage
 
Dim instance As CiTools
Dim value As System.Integer
 
value = instance.CountPixels()
public System.int CountPixels()
public function CountPixels(): System.Integer; 
public function CountPixels() : System.int;
public:
System.int CountPixels(); 

Return Value

The number of black pixels on object.Image.
Example
void CountPixel(string imageFile)
{
    CiServer ci = Inlite.ClearImageNet.Server.GetThreadServer();
    CiTools Tools = ci.CreateTools();
    Tools.Image.Open(imageFile, 1);
    Console.Write("Pixel Count=" + Tools.CountPixels());
}
Sub CountPixel(imageFile As String)
    Dim ci As CiServer = Inlite.ClearImageNet.Server.GetThreadServer()
    Dim Tools As CiTools = ci.CreateTools()
    Tools.Image.Open(imageFile, 1)
    Console.Write("Pixel Count=" + Tools.CountPixels())
End Sub
See Also

Reference

CiTools Class
CiTools Members