Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Change camera attributes in Visual Basic

Hello Eric , Thank you for your reply ,
I'm using Pixelink PL-A782 color camera 6.6 mp , of course the video mode 7 is available and via MAX I can have more or less the same behavior as vb code regarding those attributes .
The problem seems to be that i need to set Width , Height , Left and Top ( left and top <>0 ) in one instruction , otherwise the software aumatically do the autoarrange with left and top set to 0 .
 
Bye
Maury  
0 Kudos
Message 11 of 13
(1,206 Views)
Hi Maury,

I'm not 100% sure I understand what you are seeing. Do you mean that when you are in MAX and the camera is configured for Mode7 you are not able to adjust the ROI controls? I don't have that camera in front of me but I'd be suprised if you cannot change the ROI when set to Format 7.

Assuming that it does work correctly in MAX and the problem only occurs when trying to set these parameters via your VB code, it is most likely because the order yo set them is incorrect. You have to set them in an order that maintains a valid configuration at all steps. Since the individual components of the ROI dynamically adjust their limits based on the relationships between them, you can't have an intermediate state where the overall ROI is invalid.

One way to do this no matter what your starting state is would be to set the Left and Top (OffsetX and OffsetY) both to 0 first. Then you can adjust your Width and Height to which values you like. Finally you can set the OffsetX and OffsetY to whatever you want, keeping the total ROI within the bounds of the sensor, of course.

While this may be somewhat odd at first, it makes things a lot more clear from the camera's capabilities perspective because the camera is never in an invalid state. While this is not an issue for firewire cameras since the DCAM spec specifies how those attributes interact, for GigE cameras using GenICam there is no way for us to know how the attributes interact with each other prior to setting them. To ensure consistency of programs using IMAQdx with both GigE and Firewire cameras, we have the same instantaneous-validation on all cameras.

Can you send some screenshots or code snippets illustrating the problem you see?
Thanks,
Eric G
0 Kudos
Message 12 of 13
(1,179 Views)

Hello ,

I'm  Using Pixelink PL-A782 6.6 mp color camera , of course the Video Mode 7 is available .

I'm working with Video Mode 7 and triggered acquisition , I've found a "dirty" solution via set widht and height , acquire 1 frame the set left and top and acquire another one ...

Bye

Maury

 

0 Kudos
Message 13 of 13
(1,176 Views)