ni / usb3vision

Driver for USB3 Vision(TM) class devices
GNU General Public License v2.0
67 stars 31 forks source link

Application example ? #4

Closed ranshalit closed 6 years ago

ranshalit commented 6 years ago

Hello,

I would like to ask if there is an application example which shows how to aquire stream ? I also tried to understand what is the difference between stream and stream2, and queue buffer, but could not understand it. (Is there a documented maybe, that can assist on this) ? Is this driver functional and being used with applications ?

Thank you! ranran

katieensign commented 6 years ago

Hello, Thanks for reaching out! I'll try to address your questions:

Is there an application example which shows how to acquire stream? No, unfortunately it's not possible to make an example application using just this API by itself. From the README, "This driver is the kernel piece of a larger driver intended to acquire images from USB3 Vision class devices. USB3 Vision utilizes GenICam, a usermode generic programming interface that translates high-level actions into register read/write operations. Therefore, significant application logic outside of this kernel module is needed to incorporate GenICam and be fully compatible with the USB3Vision specification." More details about GenICam can be found here.

Is there documentation available to help explain queue buffer and stream functions? Unfortunately the documentation here is lacking and could be improved. Stream2 is just a replacement for the original u3v_configure_stream function and adds fields for segment_padding and segment_size. These are only used if you enable the experimental segmented transfer feature.

QueueBuffer just is indicating to the driver to that you want the camera to fill a specific buffer (indicated by bufferHandle) with image data. This means that the driver is submitting a urb describing where to DMA the data.

Let me know if you have more questions about the API.

Is the driver functional and being used with applications? Yes, this driver is actively being used as part of NI's Vision Acquisition Software stack.