11-05-2007 08:04 PM
11-06-2007 05:29 PM
11-13-2007 03:38 AM
Thank you & my apologies for posting my question twice.
You mentioned these 3 functions
GetBitmapInfo(), AllocBitmapData(), GetBitmapData()
1. You mentioned that you pulled this from the IMAQ C Function Reference Help. Please may I know where I can get this "Reference Help". In my 2 folders, C:\Program Files\National Instruments\Vision\IMAQ Vision for CVI Function Reference.chm & C:\Program Files\National Instruments\NI-IMAQ\Docs\NI-IMAQ Function Reference.chm, I can't find these functions.
2. Do you have actual examples using these functions?
3. Could I have the example C code used for "Measurement & Automation Explorer" example supplied with the PC1411?
Thank you & Best Regards
11-13-2007 03:48 AM
Just to clarify my earlier request....
Item No 3 is the program supplied whereby while in GRAB mode, moving the mouse will display, at the bottom of the image, the actual R,G,B values of that point.
- NI-IMAQ Devices - img0 : IMAQ PCI-1411 - Channel 0:PAL
Thanks.
11-14-2007 11:42 AM
Hi,
The functions I mentioned above are located in the CVI functions help, not the help file located in the IMAQ folder. Are you wanting to get the RGB values from a single pixel for each frame while doing a grab? If so then those functions are not ideal since they are looking for a bitmap. The functions that do what you are looking for are the GetColorPixelValue and IntegerToColorValue VIs, but not every VI in LabVIEW has a function that can be used when programming in C. I have contacted R&D to see if they know of some available functions and I will let you know their reply. There is no example specifically written for this but if there is a function to do what you are wanting, it should be a quick addition to the Grab example.
11-15-2007 02:35 PM
Hello Vic,
I found a function for you:
int imaqGetPixel(const Image* image, Point pixel, PixelValue* value);PixelValue is a type that contains a member called RGBValue and RGBValue is a structure that contains elements R, G, B and alpha. So if you call the above function as such:
imaqGetPixel(image, pixel, value);
Then I believe you can extract the components like this:
char Red = value.rgb.R;
char Blue = value.rgb.B;
char Green = value.rgb.G;