Parameters
- Object
- a CiObject object returned by FirstObject or NextObject methods
Return Value
An image of the size of Object.Rect containing all pixels of Object
void ExtractObjects(string imageFile) { // Open image file CiServer ci = Inlite.ClearImageNet.Server.GetThreadServer(); CiTools Tools = ci.CreateTools(); Tools.Image.Open(imageFile, 1); // Do processing CiObject Obj; CiImage imageObject; // Image of extracted object Obj = Tools.FirstObject(); while (!(Obj == null)) { imageObject = Tools.ExtractObject(Obj); // Do something with ObjImg For Example: // imageObject.Append outFile Obj = Tools.NextObject(); } }
Sub ExtractObjects(imageFile As String) ' Open image file Dim ci As CiServer = Inlite.ClearImageNet.Server.GetThreadServer() Dim Tools As CiTools = ci.CreateTools() Tools.Image.Open(imageFile, 1) ' Do processing Dim Obj As CiObject Dim imageObject As CiImage ' Image of extracted object Obj = Tools.FirstObject() Do While Not Obj Is Nothing imageObject = Tools.ExtractObject(Obj) ' Do something with ObjImg For Example: ' imageObject.Append outFile Obj = Tools.NextObject() Loop End Sub