EDT PDV SDK Documentation 6.1.0
|
Functions | |
int | edt_dvu_write_rasfile (char *fname, u_char *addr, int x_size, int y_size) |
Utility routine that outputs a 1-band, 8-bit image to a Sun raster format file (regardless of platform). More... | |
int | edt_dvu_write_rasfile16 (char *fname, u_char *addr, int x_size, int y_size, int depth_bits) |
Converts 1 band, 10-16 bit image to a sun raster format file and writes to a file. More... | |
int | edt_dvu_write_image (char *fname, u_char *addr, int x_size, int y_size, int istride) |
Utility routine that outputs a 1-band, 8-bit image to a Sun raster format file (regardless of platform), with stride. This function can be used to output a partial image. For example, to output the top left 100x100 pixels of the image, specify x_size of 100 and y_size * 100, and an istride of the actual width of the image. More... | |
int | edt_dvu_write_rasfile24 (char *fname, u_char *addr, int x_size, int y_size) |
Writes a 24-bit per pixel RGB data buffer as a Sun Raster format file. More... | |
int | edt_dvu_write_image24 (char *fname, u_char *addr, int x_size, int y_size, int istride) |
Writes a 24-bit per pixel RGB data buffer as a Sun Raster format file, with stride. More... | |
int | edt_dvu_write_bmp (char *fname, u_char *buffer, int width, int height) |
Writes an 8-bit per pixel data buffer as a grayscale Windows bitmap file. More... | |
int | edt_dvu_write_raw (int imagesize, u_char *imagebuf, char *fname) |
Writes a 24-bit per pixel RGB data buffer as a raw data file (no formatting). More... | |
void | pdv_free (void *ptr) |
Convenience routine to free the memory allocated with pdv_alloc(). More... | |
void * | pdv_alloc (int size) |
Convenience routine to allocate memory in a system-independent way. More... | |
int | pdv_access (const char *fname, int perm) |
Determines file access independent of operating system. This a convenience routine that maps to access() on Unix/Linux systems, and _access on Windows systems. More... | |
void | pdv_mark_ras_depth (void *addr, int n, int width, int height, int x, int y, int depth, int fg) |
Draws the digits of a number into an image buffer. More... | |
int | pdv_bytes_per_line (int width, int depth) |
Returns bytes per line based on width and bit depth, including depth < 8. More... | |
int | pdv_cl_camera_connected (PdvDev pdv_p) |
Checks whether a camera is connected and turned on. More... | |
int | pdv_is_cameralink (PdvDev pdv_p) |
Infers that this device is connected to is a Camera Link camera (as opposed to RS-422 or LVDS parallel), based on settings from the loaded camera config file. More... | |
int | pdv_is_simulator (PdvDev pdv_p) |
Infers that this device is a simulator, e.g. VisionLink CLS. More... | |
Various utility subroutines. Most PDV utility routines have a dvu_
prefix. dvu_
subroutines are not necessarily specific to the EDT digital imaging hardware. For example, edt_dvu_write_rasfile could conceivably be used to write a raster file from any source, not just one captured by an EDT framegrabber. As such, dvu_
subroutines do not operate on an PdvDev device handle in their parameter lists.
There are a few utility subroutines that don't take a PdvDev device handle but do have a pdv_
prefix, and may or may not have some PDV specificity.
The remaining pdv_
subroutines that do take a PdvDev device handle are tagged as utility subroutines because they do not fit any other category.
int edt_dvu_write_rasfile | ( | char * | fname, |
u_char * | addr, | ||
int | x_size, | ||
int | y_size | ||
) |
Utility routine that outputs a 1-band, 8-bit image to a Sun raster format file (regardless of platform).
fname | The name of the output file. |
addr | The address of the image data (8 bits per pixel). |
x_size | Width in pixels of image. |
y_size | Height in pixels of image. |
int edt_dvu_write_rasfile16 | ( | char * | fname, |
u_char * | addr, | ||
int | x_size, | ||
int | y_size, | ||
int | depth | ||
) |
Converts 1 band, 10-16 bit image to a sun raster format file and writes to a file.
fname | The name of the output file. |
addr | The address of the image data (8 bits per pixel). |
x_size | Width in pixels of image. |
y_size | Height in pixels of image. |
depth_bits | Number of bits per pixel |
int edt_dvu_write_image | ( | char * | fname, |
u_char * | addr, | ||
int | x_size, | ||
int | y_size, | ||
int | istride | ||
) |
Utility routine that outputs a 1-band, 8-bit image to a Sun raster format file (regardless of platform), with stride. This function can be used to output a partial image. For example, to output the top left 100x100 pixels of the image, specify x_size of 100 and y_size * 100, and an istride of the actual width of the image.
fname | The name of the output file. |
addr | The address of the image data (8 bits per pixel). |
x_size | Width in pixels of image. |
y_size | Height in pixels of image. |
istride | Number of pixels (bytes) to skip from one the beginning of one line to the beginning of the next (this should just be the image width, unless you want something weird like a diagonally skewed image). |
int edt_dvu_write_rasfile24 | ( | char * | fname, |
u_char * | addr, | ||
int | x_size, | ||
int | y_size | ||
) |
Writes a 24-bit per pixel RGB data buffer as a Sun Raster format file.
fname | File name. |
addr | Data buffer, three bytes per pixel (RGB). |
x_size | Number of pixels per line. |
y_size | Number of lines in the image. |
int edt_dvu_write_image24 | ( | char * | fname, |
u_char * | addr, | ||
int | x_size, | ||
int | y_size, | ||
int | istride | ||
) |
Writes a 24-bit per pixel RGB data buffer as a Sun Raster format file, with stride.
@Example
int edt_dvu_write_bmp | ( | char * | fname, |
u_char * | buffer, | ||
int | width, | ||
int | height | ||
) |
Writes an 8-bit per pixel data buffer as a grayscale Windows bitmap file.
@Example
int edt_dvu_write_raw | ( | int | imagesize, |
u_char * | imagebuf, | ||
char * | fname | ||
) |
Writes a 24-bit per pixel RGB data buffer as a raw data file (no formatting).
@Example
void pdv_free | ( | void * | ptr | ) |
Convenience routine to free the memory allocated with pdv_alloc().
ptr | Address of memory buffer to free. |
void * pdv_alloc | ( | int | size | ) |
Convenience routine to allocate memory in a system-independent way.
The buffer returned is page aligned. Page alignment is required for some EDT image routines and always preferred. This function uses VirtualAlloc on Windows NT/2000/XP systems, or valloc on Linux/Unix systems.
size | The number of bytes of memory to allocate |
int pdv_access | ( | const char * | fname, |
int | perm | ||
) |
Determines file access independent of operating system. This a convenience routine that maps to access()
on Unix/Linux systems, and _access
on Windows systems.
fname | The path name of the file to check access of. |
perm | The permission flag(s) to test for. See access() (Unix/Linux) or _access (Windows) for valid arguments. |
void pdv_mark_ras_depth | ( | void * | addr, |
int | n, | ||
int | width, | ||
int | height, | ||
int | x, | ||
int | y, | ||
int | depth, | ||
int | fg | ||
) |
Draws the digits of a number into an image buffer.
addr | The address of the image to be marked. |
n | The number to be marked into the image. |
width | The width of the image. |
height | The height of the image. |
x | The position in the image where the number will be drawn. |
y | The position in the image where the number will be drawn. |
depth | The number of bits per pixel of the image. |
fg | The color value to use for drawing the digits. |
int pdv_bytes_per_line | ( | int | width, |
int | depth | ||
) |
Returns bytes per line based on width and bit depth, including depth < 8.
width | Pixels per line. |
depth | Bits per pixel. |
int pdv_cl_camera_connected | ( | PdvDev | pdv_p | ) |
Checks whether a camera is connected and turned on.
Looks for an active (changing) pixel clock from the camera, and returns 1 if detected.
pdv_p | The open PDV device handle. |
int pdv_is_cameralink | ( | PdvDev | pdv_p | ) |
Infers that this device is connected to is a Camera Link camera (as opposed to RS-422 or LVDS parallel), based on settings from the loaded camera config file.
Specifically for framegrabbers, will return false (0) for simulators.
pdv_p | The open PDV device handle. |
int pdv_is_simulator | ( | PdvDev | pdv_p | ) |
Infers that this device is a simulator, e.g. VisionLink CLS.
pdv_p | The open PDV device handle. |