06-27-2014 02:22 PM
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.
Solved! Go to Solution.
06-27-2014 03:51 PM
I don't think that camera has that ability. You will probably have to use IMAQ Symmetry to do the mirror operation.
Bruce
06-27-2014 06:08 PM
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.
06-27-2014 06:34 PM
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
06-28-2014 03:12 PM
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.
06-28-2014 03:31 PM
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
06-28-2014 03:40 PM
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?
06-29-2014 04:11 PM
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?
06-29-2014 08:09 PM
06-29-2014 08:37 PM
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?