This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Thursday, March 16, 2006 8:16:35 AM(UTC)
Groups: Registered
Posts: 4
I am an absolute beginner using the LeadTools multimedia toolkit. Please bear with me.
I am capturing a video stream of the surface of a piece of paper in a VB program. The bit map is currently configured as 24bit. The video source is gray scale.
The paper has larger and smaller scale undulations that are clearly visible in the image. What I would like to do is remove the larger scale undulations. A technique I have used in the past is to band pass filter the image using an FFT.
What I would like to do is retrieve the pixel intensityfor each line in the image, do the FFT filtering, and reconstruct the image using the filtered data.
When I try and retrieve the pixel data with .Pixel, I assume I am getting the RGB data. How do I convert that to gray scale intensity? THen how do I create an image using the filtered gray scale data.
#2
Posted
:
Sunday, March 19, 2006 4:35:50 AM(UTC)
Groups: Manager, Tech Support
Posts: 367
Was thanked: 1 time(s) in 1 post(s)
The easiest way to obtain the grayscale values is to convert the whole
image to grayscale using the Grayscale method. If you do that, the 3
values for Red, Green and Blue will be equal, and you can take any of
them to know the value. One way to do that is this:
GrayValue = LEAD1.Pixel(x, y) And &HFF
About putting the value back into the image, you can assign to the Pixel property the RGB value you want.
For example, to invert the value of a pixel, you could use the following code:
g = &HFF And LEAD1.Pixel(x, y)
LEAD1.Pixel(x, y) = RGB(Not g, Not g, Not g)
Note that unless the image is small in dimensions, looping to get all
pixel values can be very slow. If you have LEADTOOLS Raster Imaging Pro
14, you can use the image processing functions provided by the toolkit
itself for much better performance. Among these is the
DiscreteFourierTransformation Method (LEADRasterProcess COM object)
Amin Dodin
Senior Support Engineer
LEAD Technologies, Inc.
![LEAD Logo LEAD Logo](https://www.leadtools.com/images/new-site-images/leadtools-logo-header.png)
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.