summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorscuri <scuri>2009-08-12 04:08:57 +0000
committerscuri <scuri>2009-08-12 04:08:57 +0000
commit6a8ef4952936e5bd018b2b595a3fd1bb40fbb103 (patch)
tree52f5e7748eb1c9b9bb6f46a657e2e56c339e3ebc /include
parent08e5c41d42be826c18480b277f644a864f237b9b (diff)
*** empty log message ***
Diffstat (limited to 'include')
-rw-r--r--include/im_capture.h34
-rw-r--r--include/im_image.h27
-rw-r--r--include/im_process_ana.h8
-rw-r--r--include/im_process_pon.h10
4 files changed, 47 insertions, 32 deletions
diff --git a/include/im_capture.h b/include/im_capture.h
index 7c130a3..bc5f732 100644
--- a/include/im_capture.h
+++ b/include/im_capture.h
@@ -47,19 +47,19 @@ const char* IM_DECL imVideoCaptureDeviceDesc(int device);
*
* \verbatim im.VideoCaptureDeviceExDesc(device: number) -> desc: string [in Lua 5] \endverbatim
* \ingroup capture */
-const char* imVideoCaptureDeviceExDesc(int device);
+const char* IM_DECL imVideoCaptureDeviceExDesc(int device);
/** Returns the device path configuration. This is a unique string.
*
* \verbatim im.VideoCaptureDevicePath(device: number) -> desc: string [in Lua 5] \endverbatim
* \ingroup capture */
-const char* imVideoCaptureDevicePath(int device);
+const char* IM_DECL imVideoCaptureDevicePath(int device);
/** Returns the vendor information. May return NULL.
*
* \verbatim im.VideoCaptureDeviceVendorInfo(device: number) -> desc: string [in Lua 5] \endverbatim
* \ingroup capture */
-const char* imVideoCaptureDeviceVendorInfo(int device);
+const char* IM_DECL imVideoCaptureDeviceVendorInfo(int device);
/** Reload the device list. The devices can be dynamically removed or added to the system.
* Returns the number of available devices.
@@ -117,17 +117,17 @@ int IM_DECL imVideoCaptureDialogCount(imVideoCapture* vc);
* dialog can be from 0 to \ref imVideoCaptureDialogCount. \n
* Returns zero if failed.
*
- * \verbatim vc:ShowDialog(dialog: number, parent: userdata) -> error: number [in Lua 5] \endverbatim
+ * \verbatim vc:ShowDialog(dialog: number, parent: userdata) -> error: boolean [in Lua 5] \endverbatim
* \ingroup capture */
int IM_DECL imVideoCaptureShowDialog(imVideoCapture* vc, int dialog, void* parent);
/** Allows to control the input and output of devices that have multiple input and outputs.
- * cross controls in which stage the input/output will be set. Usually use 1, but some capture boards
+ * The cross index controls in which stage the input/output will be set. Usually use 1, but some capture boards
* has a second stage. In Direct X it controls the crossbars.
*
- * \verbatim vc:SetInOut(input, output, cross: number) -> error: number [in Lua 5] \endverbatim
+ * \verbatim vc:SetInOut(input, output, cross: number) -> error: boolean [in Lua 5] \endverbatim
* \ingroup capture */
-int imVideoCaptureSetInOut(imVideoCapture* vc, int input, int output, int cross);
+int IM_DECL imVideoCaptureSetInOut(imVideoCapture* vc, int input, int output, int cross);
/** Returns the description of a configuration dialog.
* dialog can be from 0 to \ref imVideoCaptureDialogCount. \n
@@ -139,7 +139,7 @@ const char* IM_DECL imVideoCaptureDialogDesc(imVideoCapture* vc, int dialog);
/** Returns the number of available video formats. \n
* Returns zero if failed.
*
- * \verbatim vc:FormatCount() -> error: number [in Lua 5] \endverbatim
+ * \verbatim vc:FormatCount() -> count: number [in Lua 5] \endverbatim
* \ingroup capture */
int IM_DECL imVideoCaptureFormatCount(imVideoCapture* vc);
@@ -150,7 +150,7 @@ int IM_DECL imVideoCaptureFormatCount(imVideoCapture* vc);
* Other sizes can be available using \ref imVideoCaptureSetImageSize. \n
* Returns zero if failed.
*
- * \verbatim vc:GetFormat(format: number) -> error: number, width: number, height: number, desc: string [in Lua 5] \endverbatim
+ * \verbatim vc:GetFormat(format: number) -> error: boolean, width: number, height: number, desc: string [in Lua 5] \endverbatim
* \ingroup capture */
int IM_DECL imVideoCaptureGetFormat(imVideoCapture* vc, int format, int *width, int *height, char* desc);
@@ -162,7 +162,7 @@ int IM_DECL imVideoCaptureGetFormat(imVideoCapture* vc, int format, int *width,
* This will not affect color_mode of the capture image. \n
* Returns zero if failed.
*
- * \verbatim vc:SetFormat(format: number) -> error: number [in Lua 5] \endverbatim
+ * \verbatim vc:SetFormat([format: number]) -> error: boolean | format: number [in Lua 5] \endverbatim
* \ingroup capture */
int IM_DECL imVideoCaptureSetFormat(imVideoCapture* vc, int format);
@@ -178,7 +178,7 @@ void IM_DECL imVideoCaptureGetImageSize(imVideoCapture* vc, int *width, int *hei
* Valid sizes can be obtained with \ref imVideoCaptureGetFormat. \n
* Returns zero if failed.
*
- * \verbatim vc:SetImageSize(width: number, height: number) -> error: number [in Lua 5] \endverbatim
+ * \verbatim vc:SetImageSize(width: number, height: number) -> error: boolean [in Lua 5] \endverbatim
* \ingroup capture */
int IM_DECL imVideoCaptureSetImageSize(imVideoCapture* vc, int width, int height);
@@ -188,7 +188,7 @@ int IM_DECL imVideoCaptureSetImageSize(imVideoCapture* vc, int width, int height
* It can not have an alpha channel and orientation is always bottom up. \n
* Returns zero if failed or timeout expired, the buffer is not changed.
*
- * \verbatim vc:Frame(image: imImage, timeout: number) -> error: number [in Lua 5] \endverbatim
+ * \verbatim vc:Frame(image: imImage, timeout: number) -> error: boolean [in Lua 5] \endverbatim
* \ingroup capture */
int IM_DECL imVideoCaptureFrame(imVideoCapture* vc, unsigned char* data, int color_mode, int timeout);
@@ -197,7 +197,7 @@ int IM_DECL imVideoCaptureFrame(imVideoCapture* vc, unsigned char* data, int col
* Data format is the same as imVideoCaptureFrame. \n
* Returns zero if failed.
*
- * \verbatim vc:OneFrame(image: imImage) -> error: number [in Lua 5] \endverbatim
+ * \verbatim vc:OneFrame(image: imImage) -> error: boolean [in Lua 5] \endverbatim
* \ingroup capture */
int IM_DECL imVideoCaptureOneFrame(imVideoCapture* vc, unsigned char* data, int color_mode);
@@ -205,7 +205,7 @@ int IM_DECL imVideoCaptureOneFrame(imVideoCapture* vc, unsigned char* data, int
* Use -1 to return the current state. \n
* Returns zero if failed.
*
- * \verbatim vc:Live(live: number) -> error: number [in Lua 5] \endverbatim
+ * \verbatim vc:Live([live: number]) -> error: boolean | live: number [in Lua 5] \endverbatim
* \ingroup capture */
int IM_DECL imVideoCaptureLive(imVideoCapture* vc, int live);
@@ -214,21 +214,21 @@ int IM_DECL imVideoCaptureLive(imVideoCapture* vc, int live);
* Not all attributes support automatic modes. \n
* Returns zero if failed.
*
- * \verbatim vc:ResetAttribute(attrib: string, fauto: number) -> error: number [in Lua 5] \endverbatim
+ * \verbatim vc:ResetAttribute(attrib: string, fauto: boolean) -> error: boolean [in Lua 5] \endverbatim
* \ingroup capture */
int IM_DECL imVideoCaptureResetAttribute(imVideoCapture* vc, const char* attrib, int fauto);
/** Returns a camera or video attribute in percentage of the valid range value. \n
* Returns zero if failed or attribute not supported.
*
- * \verbatim vc:GetAttribute(attrib: string) -> error: number, percent: number [in Lua 5] \endverbatim
+ * \verbatim vc:GetAttribute(attrib: string) -> error: boolean, percent: number [in Lua 5] \endverbatim
* \ingroup capture */
int IM_DECL imVideoCaptureGetAttribute(imVideoCapture* vc, const char* attrib, float *percent);
/** Changes a camera or video attribute in percentage of the valid range value. \n
* Returns zero if failed or attribute not supported.
*
- * \verbatim vc:SetAttribute(attrib: string, percent: number) -> error: number [in Lua 5] \endverbatim
+ * \verbatim vc:SetAttribute(attrib: string, percent: number) -> error: boolean [in Lua 5] \endverbatim
* \ingroup capture */
int IM_DECL imVideoCaptureSetAttribute(imVideoCapture* vc, const char* attrib, float percent);
diff --git a/include/im_image.h b/include/im_image.h
index fca3212..f0cc4f3 100644
--- a/include/im_image.h
+++ b/include/im_image.h
@@ -68,7 +68,7 @@ typedef struct _imImage
/** Creates a new image.
- * See also \ref imDataType and \ref imColorSpace. \n
+ * See also \ref imDataType and \ref imColorSpace. Image data is cleared as \ref imImageClear. \n
* In Lua the IM image metatable name is "imImage".
* When converted to a string will return "imImage(%p) [width=%d,height=%d,color_space=%s,data_type=%s,depth=%d]" where %p is replaced by the userdata address,
* and other values are replaced by the respective attributes.
@@ -85,7 +85,7 @@ imImage* imImageInit(int width, int height, int color_space, int data_type, void
/** Creates a new image based on an existing one. \n
* If the addicional parameters are -1, the given image parameters are used. \n
- * The image atributes always are copied.
+ * The image atributes always are copied. HasAlpha is copied.
* See also \ref imDataType and \ref imColorSpace.
*
* \verbatim im.ImageCreateBased(image: imImage, [width: number], [height: number], [color_space: number], [data_type: number]) -> image: imImage [in Lua 5] \endverbatim
@@ -141,6 +141,14 @@ imImage* imImageDuplicate(const imImage* image);
* \ingroup imgclass */
imImage* imImageClone(const imImage* image);
+/** Returns an OpenGL compatible data buffer. Also returns the correspondant pixel format. \n
+ * The memory allocated is stored in the attribute "GLDATA" with BYTE type. And it will exists while the image exists. \n
+ * It can also be cleared setting the attribute to NULL.
+ *
+ * \verbatim image:GetOpenGLData() -> gldata: userdata, format: number [in Lua 5] \endverbatim
+ * \ingroup imgclass */
+void* imImageGetOpenGLData(imImage* image, int *format);
+
/** Changes an extended attribute. \n
* The data will be internally duplicated. \n
* If data is NULL the attribute is removed. \n
@@ -168,7 +176,8 @@ const void* imImageGetAttribute(const imImage* image, const char* attrib, int *d
* \ingroup imgclass */
void imImageGetAttributeList(const imImage* image, char** attrib, int *attrib_count);
-/** Sets all image data to zero.
+/** Sets all image data to zero. But if color space is YCBCR, LAB or LUV, and data type is BYTE or USHORT, then
+ * data is initialized with 128 or 32768 accordingly.
*
* \verbatim image:Clear() [in Lua 5] \endverbatim
* \ingroup imgclass */
@@ -230,12 +239,18 @@ int imImageMatch(const imImage* image1, const imImage* image2);
* \ingroup imgclass */
void imImageSetBinary(imImage* image);
-/** Changes a gray data into a binary data, done in-place.
+/** Changes a gray BYTE data (0,255) into a binary data (0,1), done in-place. Color space is not changed.
*
* \verbatim image:MakeBinary() [in Lua 5] \endverbatim
* \ingroup imgclass */
void imImageMakeBinary(imImage *image);
+/** Changes a binary data (0,1) into a gray BYTE data (0,255), done in-place. Color space is not changed.
+ *
+ * \verbatim image:MakeGray() [in Lua 5] \endverbatim
+ * \ingroup imgclass */
+void imImageMakeGray(imImage *image);
+
/** \defgroup imgfile imImage Storage
@@ -292,7 +307,7 @@ imImage* imFileLoadBitmap(imFile* ifile, int index, int *error);
* or will be a Bitmap image. \n
* Attributes from the file will be stored at the image.
* See also \ref imErrorCodes. \n
- * For now works only for ECW file format.
+ * For now, it works only for the ECW file format.
*
* \verbatim ifile:LoadRegion(index, bitmap, xmin, xmax, ymin, ymax, width, height: number) -> image: imImage, error: number [in Lua 5] \endverbatim
* Default index is 0.
@@ -349,7 +364,7 @@ imImage* imFileImageLoadBitmap(const char* file_name, int index, int *error);
* Returns NULL if failed.
* Attributes from the file will be stored at the image.
* See also \ref imErrorCodes. \n
- * For now works only for ECW file format.
+ * For now, it works only for the ECW file format.
*
* \verbatim im.FileImageLoadRegion(file_name: string, index, bitmap, xmin, xmax, ymin, ymax, width, height: number, ) -> image: imImage, error: number [in Lua 5] \endverbatim
* Default index is 0.
diff --git a/include/im_process_ana.h b/include/im_process_ana.h
index 2458be3..2853e02 100644
--- a/include/im_process_ana.h
+++ b/include/im_process_ana.h
@@ -45,7 +45,7 @@ unsigned long imCalcCountColors(const imImage* image);
* Histogram is always 256 positions long. \n
* When cumulative is different from zero it calculates the cumulative histogram.
*
- * \verbatim im.CalcHistogram(image: imImage, plane: number, cumulative: number) -> histo: table of numbers [in Lua 5] \endverbatim
+ * \verbatim im.CalcHistogram(image: imImage, plane: number, cumulative: boolean) -> histo: table of numbers [in Lua 5] \endverbatim
* Where plane is the depth plane to calculate the histogram. \n
* The returned table is zero indexed. image can be IM_USHORT or IM_BYTE.
* \ingroup stats */
@@ -64,7 +64,7 @@ void imCalcUShortHistogram(const unsigned short* data, int count, unsigned long*
* Histogram is always 256 positions long. \n
* When cumulative is different from zero it calculates the cumulative histogram.
*
- * \verbatim im.CalcGrayHistogram(image: imImage, cumulative: number) -> histo: table of numbers [in Lua 5] \endverbatim
+ * \verbatim im.CalcGrayHistogram(image: imImage, cumulative: boolean) -> histo: table of numbers [in Lua 5] \endverbatim
* \ingroup stats */
void imCalcGrayHistogram(const imImage* image, unsigned long* histo, int cumulative);
@@ -120,8 +120,8 @@ void imCalcHistoImageStatistics(const imImage* image, int* median, int* mode);
* Returns the number of regions found. Background is marked as 0. \n
* Regions touching the border are considered only if touch_border=1.
*
- * \verbatim im.AnalyzeFindRegions(src_image: imImage, dst_image: imImage, connect: number, touch_border: number) -> count: number [in Lua 5] \endverbatim
- * \verbatim im.AnalyzeFindRegionsNew(image: imImage, connect: number, touch_border: number) -> count: number, new_image: imImage [in Lua 5] \endverbatim
+ * \verbatim im.AnalyzeFindRegions(src_image: imImage, dst_image: imImage, connect: number, touch_border: boolean) -> count: number [in Lua 5] \endverbatim
+ * \verbatim im.AnalyzeFindRegionsNew(image: imImage, connect: number, touch_border: boolean) -> count: number, new_image: imImage [in Lua 5] \endverbatim
* \ingroup analyze */
int imAnalyzeFindRegions(const imImage* src_image, imImage* dst_image, int connect, int touch_border);
diff --git a/include/im_process_pon.h b/include/im_process_pon.h
index cfed5ae..bf09a71 100644
--- a/include/im_process_pon.h
+++ b/include/im_process_pon.h
@@ -122,17 +122,17 @@ void imProcessBlend(const imImage* src_image1, const imImage* src_image2, const
* or magnitude and phase parts (polar). \n
* Source image must be IM_CFLOAT, destiny images must be IM_FLOAT.
*
- * \verbatim im.ProcessSplitComplex(src_image: imImage, dst_image1: imImage, dst_image2: imImage, do_polar: boolean) [in Lua 5] \endverbatim
- * \verbatim im.ProcessSplitComplexNew(image: imImage, do_polar: boolean) -> dst_image1: imImage, dst_image2: imImage [in Lua 5] \endverbatim
+ * \verbatim im.ProcessSplitComplex(src_image: imImage, dst_image1: imImage, dst_image2: imImage, polar: boolean) [in Lua 5] \endverbatim
+ * \verbatim im.ProcessSplitComplexNew(image: imImage, polar: boolean) -> dst_image1: imImage, dst_image2: imImage [in Lua 5] \endverbatim
* \ingroup arithm */
-void imProcessSplitComplex(const imImage* src_image, imImage* dst_image1, imImage* dst_image2, int do_polar);
+void imProcessSplitComplex(const imImage* src_image, imImage* dst_image1, imImage* dst_image2, int polar);
/** Merges two images as the real and imaginary parts of a complex image, \n
* or as magnitude and phase parts (polar = 1). \n
* Source images must be IM_FLOAT, destiny image must be IM_CFLOAT.
*
- * \verbatim im.ProcessMergeComplex(src_image1: imImage, src_image2: imImage, dst_image: imImage) [in Lua 5] \endverbatim
- * \verbatim im.ProcessMergeComplexNew(image1: imImage, image2: imImage) -> new_image: imImage [in Lua 5] \endverbatim
+ * \verbatim im.ProcessMergeComplex(src_image1: imImage, src_image2: imImage, dst_image: imImage, polar: boolean) [in Lua 5] \endverbatim
+ * \verbatim im.ProcessMergeComplexNew(image1: imImage, image2: imImage, polar: boolean) -> new_image: imImage [in Lua 5] \endverbatim
* \ingroup arithm */
void imProcessMergeComplex(const imImage* src_image1, const imImage* src_image2, imImage* dst_image, int polar);