This sample program, PXR_VB_NET_LUT, illustrates the use of the Imagenation PXR800 with
the new programming language Visual Basic .NET .
The PXR800 contains a 256-byte by 8-byte Look Up Table (LUT). This sample shows you how
to manage that LUT.
Incoming video is digitized and then passed through the LUT. Digitizing the incoming video
yields the values 0 through 255. Those values are used as indices to the LUT which is loaded by default with the values 0 through 255. Since
the input values match the values in the LUT, the output matches the input. In other words, there is no change in the video. However. if you
load the LUT with the values 255 to 0, then the output video is the exact opposite from the input: it looks like a photographic negative.
The LUT is most commonly used as a threshholding device. Let's say your algorithms are not interested
in any values of light below 50. You would load the 0 through 49 indices with the value 0, and you would load the indices 50 through 255 with
the values of 50 through 255. That means any light below the value of 50 would be completely black.
This sample shows you how to load the LUT by all three methods: full, partial, or single values. Whether you use our
sample as a starting point or not, you will need the interface file contained in
this package if you want to work in Visual Basic .NET .
This is what you need for Visual Basic .NET development:
In order to develop a Visual Basic .NET application for the PXR800, you
need to have an interface file that redefines all of the PXR800 functions and links the new definitions
to the existing PXR800 DLLs.
This is what we are giving you in this package:
The interface file containing the following three types of data:
| 1. | The DLL function redefinitions - Redefines all the functions that
are explained in the the PXR800 Frame Grabber User's Guide and contained in the PXR800 DLLs. |
2. | Global variable definitions – A set of common static variable names used by the PXR800 API. |
3. | Display Form - Some useful functions for displaying images. You may want to use these functions in your own application to to avoid building them from scratch.
|
A sample Visual Basic .NET program that illustrates the following concepts:
| 1. | Library initialization - Proper initialization of the PXR800 libraries. |
2. | Display - Done by getting a pointer to the acquired image using the
PXR800 FrameBuffer() function and then creating a bitmap by calling the Bitmap() function. |
3. | Continuous image update - Uses a timer to cause the image window to be continuously updated.
|
This is how you use it:
Download this package into a directory where you want to work.
Unzip it into that same directory. Build the sample and execute it to make sure it works. Then modify it for your
application. If you are building a new Visual Basic .NET application, you might want to start with our sample code. If you already have an application that you are porting, you may just want to use our interface
file.