NI Home > Community > NI Discussion Forums

Machine Vision

Reply
Member
Nate_W.
Posts: 8
0 Kudos

IMAQ imgPlotDC2

 

Hi,

 

I'm using function imgPlotDC2 to capture an image from my frame grabber and display it. It works find in my 32-bit application (left picture), but the 64-bit application image is messed up. Any ideas?

 

Thanks,

Nate

 

32-bit Capture64-bit Image

Trusted Enthusiast
TiTou
Posts: 2,766
0 Kudos

Re: IMAQ imgPlotDC2

"where" are you calling that function? not from LabVIEW I imagine.

LabWindows CVI? Else?

 

When you install IMAQ drivers on a windows 64bit you can insependently select 32bit (WOW) and 64bit install. And then if you're using LabVIEW to develop your application you have to install the correct version you want LV 32bit or LV64bit (both can be installed on the same computer it works) and LV 32bit will use the 32b IMAQ driver and LV64bit will use the 64bit IMAq driver automatically, but if you're calling function from a different environnement I'm not sure how to specify the one you want.

 

Sorry, can't help more than that.

_______________________________________________________________________
When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"
Active Participant
BlueCheese
Posts: 1,176
0 Kudos

Re: IMAQ imgPlotDC2

Hi Nate,

 

That garbled image somewhat looks like to me like there is some sort of mix-up regarding the bit-depth to display the image with. What bit depth is your camera file setup for? What are the flags you pass to imgPlotDC2?

 

Can you try running one of the shipping C examples that display images? "snap imgplot.c" seems like it uses imgPlot2(), but that just redirects into imgPlotDC2() internally. If these work in both 32-bit and 64-bit apps then I suspect it is an issue with the flags or other paramaters you are passing to the function.

 

Eric

Member
Nate_W.
Posts: 8
0 Kudos

Re: IMAQ imgPlotDC2

So, I tried the 'LL Grab' example in 'C:\users\Public\Documents\National Instruments\NI-IMAQ\Examples\MSVC\Grab\LL Grab\', and I got the same result. The 32-bit app looks fine but the 64-bit app image is messed up.

 

(My application is a C# app that uses P-Invoke and the c:\windows\system32\imaq.dll, I also tried using the Active X 'imaq' component, but I get the same result. I am passing in IMGPLOT_MONO_12 to imgPlotDC2. I installed NI-IMAQ 4.6.4, but I didn't see a 64-bit option in the installation. I currently have 3 NI PCIe-1430 cards (firmware version 4.6.4.49152) in a very high end Falcon computer.)

 

Thanks in advance for any help you might be able to provide.

 

Nate

 

32-bit LL Grab64-bit LL Grab

Member
Daniel_H1
Posts: 81
0 Kudos

Re: IMAQ imgPlotDC2

[ Edited ]

Hi Nate,

 

I see that you have used the example program from C:\users\Public\Documents\National Instruments\NI-IMAQ\Examples\MSVC\Grab\LL Grab\. I am wondering if we can get some more information about how you specified 32-bit vs 64-bit applications. There should only be one llgrab.exe in that folder, so I am curious about where you loaded each .exe from. Did you build one of them yourself from the example code? 

 

I am trying to reproduce the behavior you are seeing, so any extra details you can provide will be very helpful.


Regards,


Daniel H

 

Customer Education Product Support Engineer
National Instruments
Certified LabVIEW Developer
Active Participant
BlueCheese
Posts: 1,176
0 Kudos

Re: IMAQ imgPlotDC2

[ Edited ]

Daniel H wrote:

Hi Nate,

 

I see that you have used the example program from C:\users\Public\Documents\National Instruments\NI-IMAQ\Examples\MSVC\Grab\LL Grab\. I am wondering if we can get some more information about how you specified 32-bit vs 64-bit applications. There should only be one llgrab.exe in that folder, so I am curious about where you loaded each .exe from. Did you build one of them yourself from the example code? 

 

I am trying to reproduce the behavior you are seeing, so any extra details you can provide will be very helpful.


Regards,


Daniel H

 


Daniel,

 

The examples ships with a Visual Studio project file for building the example and there are two configurations already enabled in the solution - 32-bit and 64-bit - so you can build it both ways. The pre-built exe (32-bit) is just installed as a convenience so you can run the example out-of-the-box without compiling anything. If you want to build thr 64-bit solution, just open the included .vcproj file with Visual Studio 2005 or later and select the "x64" configuration prior to building.

 

Eric

Member
Nate_W.
Posts: 8
0 Kudos

Re: IMAQ imgPlotDC2

Hi, 

 

Indeed, I did rebuild the example as an x64 app. However, the display is garbled (the second image of the example shows this). Any ideas?

 

Nate

Active Participant
BlueCheese
Posts: 1,176
0 Kudos

Re: IMAQ imgPlotDC2

Hi Nate,

I believe Daniel is trying to reproduce this in-house now (my previous comment was directed at him) so hopefully we will get to the bottom of this shortly.

Eric

Member
Daniel_H1
Posts: 81
0 Kudos

Re: IMAQ imgPlotDC2

Hi Nate,


I am indeed trying to reproduce the issue here, but everything seems to be working fine. I'm running the llgrab example (both 32-bit and 64-bit) on a Windows 7 64-bit machine, with a PCIe-1430 framegrabber. I have NI-IMAQ 4.6.4 installed. Both llgrab.exe versions produce good images.

 

What camera are you using? Are you sure the pixels are 12-bit?

Did you change anything in the example code before building it into the 64-bit llgrab.exe? 

Have you seen this with each of your PCIe-1430 cards, or just one of them?

Have you tried this on a different computer?

Have you seen this behavior with any other cameras?

 

One thing you might try is upgrading to IMAQ 4.7. This is included in Vision Acquisition Software 2012.08. If there was any problem during the install of IMAQ 4.6.4, this will overwrite the older driver and add any missing files. 

 

I will be out of office next week, but another engineer will take over while I am gone, so you will continue getting responses here.

 

Regards,

 

Daniel H 

Customer Education Product Support Engineer
National Instruments
Certified LabVIEW Developer
Active Participant
BlueCheese
Posts: 1,176
0 Kudos

Re: IMAQ imgPlotDC2

Daniel,

 

Are you trying to replicate this with a 12-bit camera or an 8-bit camera?

 

Eric