Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Impossible to modify Image size with Directshow

Hi!

  i'm using an IDS ueye USB camera with directshow.

With its own software and other Dierctshow softwares, i'm able to modify the size of the image and the frame rate of the camera.

Unfortunatelly, with MAX is impossible to change the size of the image.

I can only choose between few video mode by a ring control, such as "1024x768 RGB32 15.00fps","1024x768 RGB24 15.00fps,"1024x768 RGB8 15.00fps". No way to select a custom format.

With other directshow softwares i can change the FPS, Width and Heught parameters without any problems.

As you can see in the attached image, the value of the size are disabled.

I attach even the AMCap .ini files.

Can anyone help me?Is it a bug of Max?

0 Kudos
Message 1 of 10
(4,598 Views)
One immediate way is you can resample the images. Try image geometry-->resample.
0 Kudos
Message 2 of 10
(4,597 Views)

Yes i know, I've already done it.

The problem is that i have to change my software for a problem that should not exist.

I should be able to change the image size in max and when i open the resource in Labview it will open the image with the right size.

Instead in this way i had to create a software that change the size using software and then save in afile the dimension and position of the image and call the file in my main program to apply a mask to the original image.

0 Kudos
Message 3 of 10
(4,590 Views)
grepponline,
 
This is a limitation of DirectShow. The subset of defined interfaces for controlling the camera is fixed and limited and does not include facilities for things such as changing the width and height directly, only via the list of video modes the driver exposes.
 
What you are seeing is that DirectShow provides facilities that a driver can provide a UI panel that can be opened to control things in their driver directly. It seems that IDS's driver has a custom panel for controlling those things you showed in your screenshot.
 
Now, in IMAQdx we made a conscious decision not to rely on the camera-vendor-specific UI popup. There are many reasons for this, but the main reason is that IMAQdx cannot interact programatically with those panels. One would have to call some function in IMAQdx and then a random window would have to pop up that the user would have to interact with. We would also have no way to store these settings in our camera file like all the other camera settings, since DirectShow leaves it vendor-defined how the driver is expected to store any changes you make in their UI. 
 
As you mentioned, it makes sense for customers writing software using IMAQdx to be able to write software once and use it with any camera IMAQdx supports. Any saved settings in MAX are applied when you open the camera. If we relied upon the vendor-specific UI panels we could not give this behavior.
 
I would suggest you encourage IDS to provide more options in their standardized supported video modes DirectShow interface if you are not finding a mode that matches what you want. The other option would be to move to a camera technology that is more flexible with regards to configuring the camera in a generic way, such as firewire or GiGE Vision.
 
Eric 
 
 
Message 4 of 10
(4,572 Views)
If it is so, why with AMCap, VirtualVCR and other directshow softwares, i can change the size? They do not communicate directly with the Driver, they only use DirectShow.
0 Kudos
Message 5 of 10
(4,559 Views)

Hi gepponline,

 

They may use DirectShow but they call into an interface exposed by the driver that just tells the driver to expose a dialog window (I believe it is the IAMVfwCaptureDialogs::ShowDialog method). This can work in end applications as you mentioned (AMCap, etc) but can't really be used from an API like IMAQdx that is expected to be called by customers designing their own application, or applications without a GUI.

 

Eric 

Message 6 of 10
(4,545 Views)
If it is so, i should see the same windows in every program to change the size, instead every software has its own dialog window, different for every program.
0 Kudos
Message 7 of 10
(4,526 Views)
Ops..maybe my fault. Different layout and way to arrive, but same windows...
0 Kudos
Message 8 of 10
(4,517 Views)

I understand this is a 4 year old thread but I wanted to confirm if NI has deviated from its "conscious decision not to rely on the camera-vendor-specific UI popup" within IMAQdx and Labview. Certainly based on my latest experience with IMAQdx (Aug 2013), it doesn't appear to have.

 

Just to elaborate, the outgoing pin of my camera filter has a property UI popup to adjust for AOI (horizontal/vertical) resolution. I can of course access and adjust that within something like amcap or graphstudionext. With NI-MAX and IMAQdx, I can not (understandably by design it appears) access that popup to adjust the AOI and thereby the FPS as well. Neither can i access the UI popup for the camera filter itself. 

 

I also understand that GigEVision and USB3Vision will work more intuitively with Labview but I just want to confirm that this particular limitation with directshow still existed. I am also guessing the workarounds remain unchanged - a) offer more video modes (although unrealistic to offer all permutations with AOI) or b) use a GigE/USB3Vision camera.

 

Thanks,

Terence

0 Kudos
Message 9 of 10
(3,583 Views)

"I just want to confirm that this particular limitation with directshow still existed."

 

I can confirm that this limitations with Directshow still exists. Workarounds are the same, too.

0 Kudos
Message 10 of 10
(3,578 Views)