LEADTOOLS Support
Imaging
Imaging SDK Examples
HOW TO: Use Image Processing Commands to Improve your Images for Recognition
#1
Posted
:
Friday, August 11, 2017 4:51:51 PM(UTC)
Groups: Registered
Posts: 119
Was thanked: 4 time(s) in 4 post(s)
Below you will find a link as well as a code snippet on how you can improve your images using simple Image Processing commands.
https://www.leadtools.co...age-processing/functionsDespeckle and Minimum Command: Code:
String input= @"PATH TO IMAGE";
using (RasterCodecs codecs = new RasterCodecs())
{
try
{
// Load a single page of the input file at 24 BPP
using (RasterImage image = codecs.Load(input, 24, CodecsLoadByteOrder.Rgb, 1, 1))
{
// Prepare the command
DespeckleCommand d_command = new DespeckleCommand();
// Run command on image to removes speckle
d_command.Run(image);
// Prepare the command
MinumumCommand m_command = new MinumumCommand();
//Apply the Minimum filter, darkness intensity.
command.Dimension = 2;
// Run command on image to increase darkness intensity on pixels
m_command.Run(image);
// Save a single page of the input file after Image Processing at 24 BPP as a RasterPdf
codecs.Save(image, output, RasterImageFormat.RasPdf, 24);
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
Nick Villalobos
Developer Support Engineer
LEAD Technologies, Inc.
LEADTOOLS Support
Imaging
Imaging SDK Examples
HOW TO: Use Image Processing Commands to Improve your Images for Recognition
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.