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, March 16, 2006 8:16:35 AM(UTC)
ijourneaux

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.

 

 

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 : Sunday, March 19, 2006 4:35:50 AM(UTC)

Amin  
Amin

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
 
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.058 seconds.