LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying Images

Greetings,

          I am kind of new to LabWindows so bear with me. I am sending to my LabWindows project a raw image buffer (of type void*) via DataSockets and I would like to display this raw image in LabWindows. Is there a simple way to do this? Do I have to have IMAQ imstalled or is there another option? I read the doc http://zone.ni.com/devzone/cda/tut/p/id/2809 and it appears the imgPlot(...) function would be perfect, but is this an IMAQ tool? Thanks for any help.

0 Kudos
Message 1 of 5
(3,375 Views)

Hello,

 

imgPlot() does require NI-IMAQ.  One function I found in the CVI help that might be useful to you is NewBitmapEx(...):

http://zone.ni.com/reference/en-XX/help/370051K-01/cvi/cvinewbitmapex/

 

I'm not too familiar with working with images, what kind of data is in your raw image buffer?  Is it a character array with one character for each pixel like in a bitmap or is it something completely different?

 

 

Kristen
National Instruments
0 Kudos
Message 2 of 5
(3,356 Views)

Kristen,

           Thanks for the response and I apologize for the delay in mine. The image being read in is from a 1394 camera. We are using the CMU 1394 camera classes to read in data from the camera over 1394 to the our program. Essentially, all it does is pull in the raw image and pack it in a character array point, or char*. When it is received top-level, it is of type void*, which is why I thought imgPlot() would be the best for our situation since its parameter takes in a buffer of type void*. When you say it's not in the NI_IMAQ package, is it in another package? Or is it standard in LabWindows? Thanks for the help.

0 Kudos
Message 3 of 5
(3,330 Views)
Pardon my dyslexia 🙂 I see that imgPlot does indeed require NI_IMAQ. In regards to functions already in the LabWindows standard libraries you mentioned the NewBitmapEx function. Is it possible to actually create a bitmap via a void*?
0 Kudos
Message 4 of 5
(3,321 Views)

Hello Ice Cold Iceman,

 

From the link Kristen posted we can see that NewBitmapEx (or NewBitmap for that matter) will indeed return a handle to a bitmap object. However, you will need to make sure you give the function the proper data so that it can create a valid handle to the correct bitmap. Please see the link for which parameters the function takes. "bits" is an unsigned char array which is most likely what you will need to pass your data to. I am not 100% sure that with the data you have it will properly recreate the image with NewBitmap but I believe it will if you make sure the other parameters you input are correct.

 

One thing I did want to mention is that you can download an evaluation version of the Vision Acquisition Software here. This will give you full functionality for 30 days if you would like to try things out. If you are interested in purchasing the Vision Acquisition Software please just say so and I will contact you offline to assist further.

With warm regards,

David D.
0 Kudos
Message 5 of 5
(3,294 Views)