Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I access vertical mirror attribute for a firewire camera (imaqdx)

Solved!
Go to solution

We have a camera which looks at an actual physical mirror but the image from the camera feeding into the application needs to be properly oriented as if the camera were looking at the object directly. I was hoping to use the vertical mirror attribute to set the image orientation in the imaqdx driver (this is a Fire-I firewire camera from unibrain) but I cannot find this setting exposed anywhere. Any hints on how to do this? Thanks in advance.

0 Kudos
Message 1 of 16
(5,216 Views)

I don't think that camera has that ability.  You will probably have to use IMAQ Symmetry to do the mirror operation.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 16
(5,204 Views)

The vendor application uses IMAQdx driver. Can we add a layer of processing as a vi and still expose it as a driver so our app can use it? We cannot modify the existing application.

 

0 Kudos
Message 3 of 16
(5,198 Views)

I don't think so.  You would have to get a better camera to have the mirror option.  I know you can get a USB3 Basler camera for under $500, and it has the Reverse X option.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 4 of 16
(5,192 Views)

So you are saying that the flipping happens on the camera? Not in the driver? Flipping an image is as simple as changing the sign of image height and image stride internally. You do not need any fancy hardware for that.

0 Kudos
Message 5 of 16
(5,176 Views)

It is very easy to do the flipping in the software using IMAQ Symmetry, but they are using a canned program and don't have the ability to edit the software.  If you can't do it in the software, you have to do it in the hardware.  The camera has to have the feature to be able to do it in hardware.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 6 of 16
(5,174 Views)

It is hard to find a cheap 2/3" sensor camera which can work with imaqdx. Fire-I 702c we are using cost us $200 and that was too much. The software we use is closed source and the vendor has gone out of business. So we need the IMAQdx driver to do the work. Assuming the driver passes DIBsections to the application then all that needs to happen is two bits in DIB headers need to flip (signs of image height and image stride). Is there an IMAQdx hacking community (this is nothing that a bit of hex editing can't fix)? Does NI help with issues like this?

0 Kudos
Message 7 of 16
(5,173 Views)

Looks like a basic DLL wrapper for niimaqdxk.dll would be the simplest way to go. This could be done automatically for almost all DLL calls: http://www.codeproject.com/Articles/16541/Create-your-Proxy-DLLs-automatically

But the question is what data structures are passed between niimaqdxk.dll and niimaqdx.dll especially when it comes to video frames. So in other words the question is whether internal data structures for imaqdx are documented anywhere. I guess I will contact NI for support but I wonder if these resources are already posted. I am sure NI has a PDF somewhere, right?

0 Kudos
Message 8 of 16
(5,149 Views)
The driver doesn't pass DIB sections at all. The mechanisms for interacting between the driver Vision library is cross-platform and doesn't have Win32 conventions.

One option might be to use the Microsoft FireWire driver that interacts with DirectShow with the camera rather than the IMAQdx 1394 driver. IMAQdx can then acquire from it as though it were a DirectShow camera, and could do the Windows-bitmap-specific flipping.
0 Kudos
Message 9 of 16
(5,139 Views)

Thanks. This sounds like a plan. We could get MS firewire driver on there - that's easy. I am guessing we could make a DirectShow graph and do the flipping within the transform filter. But how do we then get IMAQdx to recognize the graph output as a camera? Can you link to an example of this being done?

0 Kudos
Message 10 of 16
(5,135 Views)