![]() |
capture
|
Native Capture interface, for reading native uncompressed images. More...
Go to the source code of this file.
Typedefs | |
| typedef struct _media_native | media_native |
Functions | |
| media_native * | capture_open_native (int width, int height) |
| Open a connection to retrieve architecture dependent YUV images. More... | |
| media_native * | capture_open_native_channel (unsigned int channel, int width, int height) |
| Open a connection to retrieve architecture dependent YUV images from a specific video channel. More... | |
| void | capture_start_native (media_native *nat) |
| Add an initial capture request for a native image. More... | |
| void * | capture_get_image_native (media_native *nat) |
| Read an architecture dependent YUV image. More... | |
| void | capture_close_native (media_native *nat) |
| Close connection to native image reading. More... | |
Native Capture interface, for reading native uncompressed images.
Can be used to read YUV images in the format native to the current hardware. (UYVY on artpec-3 and artpec-4, NV12 on ambarella-a5s) Through the interface, width and height is specified and a pointer to a buffer of YUV data can be read. The memory for the buffer is reused and it needs to be copied if it is to be saved. If the application need to be fast and the format of YUV or the need to use VAPIX functionality like cropping is not important, then this interface can be useful.
| media_native* capture_open_native | ( | int | width, |
| int | height | ||
| ) |
Open a connection to retrieve architecture dependent YUV images.
| width | The width of the image. |
| height | The height of the image. |
| media_native* capture_open_native_channel | ( | unsigned int | channel, |
| int | width, | ||
| int | height | ||
| ) |
Open a connection to retrieve architecture dependent YUV images from a specific video channel.
This function is an extension of capture_open_native with the possibility to specify from which video channel the YUV image should be retrieved.
| channel | The video channel to be used as input for the image. |
| width | The width of the image. |
| height | The height of the image. |
| void capture_start_native | ( | media_native * | nat | ) |
Add an initial capture request for a native image.
| nat | The media_native object. |
| void* capture_get_image_native | ( | media_native * | nat | ) |
Read an architecture dependent YUV image.
The memory will be re-used for each new call to this function. If you need to store the image you have to copy it! This will block until an image is ready and then add a new capture request.
| nat | The media_native object. |
| void capture_close_native | ( | media_native * | nat | ) |
Close connection to native image reading.
This will free the memory used to buffer an image.
| nat | The media_native object. |