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 : Thursday, August 16, 2007 12:51:10 PM(UTC)

mcastro  
mcastro

Groups: Registered
Posts: 4


Hi,


I'm tring to use LineRemove with very poor images and as a result I have also very poor results... :)

So I have an idea but I don't find the way to do it. Please help me.

What I want to do is copy the original image, dilate some times, then erode, and apply delete lines to this awfull image with very good lines, and then with the region built by the lineRemove method, apply some combine to the original image to delete the lines by pixel XOR over the poor image.

Is this possible, could it be done?, what is the way to extract an image from the region.

here is some code.

L_INT nRet;
LBitmapBase LeadBitmap; /* Bitmap handle to hold the loaded image */
nRet =LeadBitmap.Load (.....);
if(nRet !=SUCCESS)
return nRet;
LBitmap workbench;
workbench.copy( &LeadBitmap );


workbench.BinaryFilter( BFLT_DILATION_OMNI );
workbench.BinaryFilter( BFLT_DILATION_OMNI );



BITMAPHANDLE   bitmapRegion;
                    memset( &bitmapRegion, 0, sizeof(BITMAPHANDLE));

LINEREMOVE                lr;
                    memset ( &lr, 0, sizeof ( LINEREMOVE ) ) ;
                    lr.uFlags                = flags;
                    lr.uStructSize            = sizeof(LINEREMOVE);
                    lr.uBitmapStructSize    = sizeof(BITMAPHANDLE);
                   
                    lr.iMaxLineWidth        = lineWidth;
                    lr.iMinLineLength        = lineLength;
                    lr.iWall                = wallHeight;
                    lr.iMaxWallPercent        = maxWallPercent;
                    lr.uRemoveFlags            = directionEnum;
                    lr.iGapLength            = gapLength;
                    lr.iVariance            = lineVariance;
                    lr.hRgn                    = NULL;
                    lr.pBitmapRegion        = &bitmapRegion;

workbench.LineRemove( &lr );

....

Now is supposed that bitmapRegion contains the deleted lines, but I don't know how to build an image with this region in order to combine it with te original image..

please help me!.

Best regards.

 

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 : Friday, August 17, 2007 11:31:32 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


To combine only a portion of an image, use the LBitmapBase::Combine method.  If you have a region selected in the source image, the Combine method will only combine that portion of the image.  For a flat copy/paste, use the flags CB_DST_0 | CB_OP_ADD.
 
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-2024, Yet Another Forum.NET
This page was generated in 0.080 seconds.