Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, August 24, 2010 8:40:51 PM(UTC)

anjana  
anjana

Groups: Registered
Posts: 3


I am using Leadtools 15 API.I am trying to create a mask from the selected region(ROI) of the image.Can I get some example code for this
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, August 25, 2010 3:10:54 AM(UTC)

Basel  
Guest

Groups: Guests
Posts: 3,028

Was thanked: 2 time(s) in 2 post(s)

Did you try to use L_SetBitmapRgnFromMask? Did you face problems? If yes, please give me more details about it.

Here's a sample code from our help file:

L_INT SetBitmapRgnFromMaskExample(pBITMAPHANDLE pBitmap)
{
   L_INT nRet;
   BITMAPHANDLE MaskBitmap; /* Bitmap handle that holds the mask bitmap */

   nRet = L_LoadBitmap (TEXT("C:\\Program Files\\LEAD Technologies\\LEADTOOLS 15\\Images\\MASK.TIF"), &MaskBitmap, sizeof(BITMAPHANDLE), 1, ORDER_BGR, NULL, NULL );
   if(nRet != SUCCESS)
      return nRet;
   nRet = L_SetBitmapRgnFromMask ( pBitmap, NULL, &MaskBitmap, L_RGN_SET );
   if(nRet != SUCCESS)
   {
      if(MaskBitmap.Flags.Allocated)
         L_FreeBitmap(&MaskBitmap);
      return nRet;
   }
   if(MaskBitmap.Flags.Allocated)
      L_FreeBitmap(&MaskBitmap);
   return SUCCESS;
}
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.103 seconds.