OpenCV for Unity 2.6.5
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/4.10.0/index.html ) for the details of the argument of the method.
|
Static Public Member Functions | |
static bool | haveImageReader (string filename) |
Returns true if the specified image can be decoded by OpenCV. | |
static bool | haveImageWriter (string filename) |
Returns true if an image with the specified filename can be encoded by OpenCV. | |
static long | imcount (string filename) |
Returns the number of images inside the give file. | |
static long | imcount (string filename, int flags) |
Returns the number of images inside the give file. | |
static Mat | imdecode (Mat buf, int flags) |
Reads an image from a buffer in memory. | |
static bool | imdecodemulti (Mat buf, int flags, List< Mat > mats) |
Reads a multi-page image from a buffer in memory. | |
static bool | imdecodemulti (Mat buf, int flags, List< Mat > mats, Range range) |
Reads a multi-page image from a buffer in memory. | |
static bool | imencode (string ext, Mat img, MatOfByte buf) |
Encodes an image into a memory buffer. | |
static bool | imencode (string ext, Mat img, MatOfByte buf, MatOfInt _params) |
Encodes an image into a memory buffer. | |
static Mat | imread (string filename) |
Loads an image from a file. | |
static Mat | imread (string filename, int flags) |
Loads an image from a file. | |
static void | imread (string filename, Mat dst) |
Loads an image from a file. | |
static void | imread (string filename, Mat dst, int flags) |
Loads an image from a file. | |
static bool | imreadmulti (string filename, List< Mat > mats) |
Loads a multi-page image from a file. | |
static bool | imreadmulti (string filename, List< Mat > mats, int flags) |
Loads a multi-page image from a file. | |
static bool | imreadmulti (string filename, List< Mat > mats, int start, int count) |
Loads a of images of a multi-page image from a file. | |
static bool | imreadmulti (string filename, List< Mat > mats, int start, int count, int flags) |
Loads a of images of a multi-page image from a file. | |
static bool | imwrite (string filename, Mat img) |
Saves an image to a specified file. | |
static bool | imwrite (string filename, Mat img, MatOfInt _params) |
Saves an image to a specified file. | |
static bool | imwritemulti (string filename, List< Mat > img) |
static bool | imwritemulti (string filename, List< Mat > img, MatOfInt _params) |
|
static |
Returns true if the specified image can be decoded by OpenCV.
filename | File name of the image |
|
static |
Returns true if an image with the specified filename can be encoded by OpenCV.
filename | File name of the image |
|
static |
Returns the number of images inside the give file.
The function imcount will return the number of pages in a multi-page image, or 1 for single-page images
filename | Name of file to be loaded. |
flags | Flag that can take values of cv::ImreadModes, default with cv::IMREAD_ANYCOLOR. |
|
static |
Returns the number of images inside the give file.
The function imcount will return the number of pages in a multi-page image, or 1 for single-page images
filename | Name of file to be loaded. |
flags | Flag that can take values of cv::ImreadModes, default with cv::IMREAD_ANYCOLOR. |
Reads an image from a buffer in memory.
The function imdecode reads an image from the specified buffer in the memory. If the buffer is too short or contains invalid data, the function returns an empty matrix ( Mat::data==NULL ).
See cv::imread for the list of supported formats and flags description.
buf | Input array or vector of bytes. |
flags | The same flags as in cv::imread, see cv::ImreadModes. |
|
static |
Reads a multi-page image from a buffer in memory.
The function imdecodemulti reads a multi-page image from the specified buffer in the memory. If the buffer is too short or contains invalid data, the function returns false.
See cv::imreadmulti for the list of supported formats and flags description.
buf | Input array or vector of bytes. |
flags | The same flags as in cv::imread, see cv::ImreadModes. |
mats | A vector of Mat objects holding each page, if more than one. |
range | A continuous selection of pages. |
|
static |
Reads a multi-page image from a buffer in memory.
The function imdecodemulti reads a multi-page image from the specified buffer in the memory. If the buffer is too short or contains invalid data, the function returns false.
See cv::imreadmulti for the list of supported formats and flags description.
buf | Input array or vector of bytes. |
flags | The same flags as in cv::imread, see cv::ImreadModes. |
mats | A vector of Mat objects holding each page, if more than one. |
range | A continuous selection of pages. |
|
static |
Encodes an image into a memory buffer.
The function imencode compresses the image and stores it in the memory buffer that is resized to fit the result. See cv::imwrite for the list of supported formats and flags description.
ext | File extension that defines the output format. Must include a leading period. |
img | Image to be written. |
buf | Output buffer resized to fit the compressed image. |
params | Format-specific parameters. See cv::imwrite and cv::ImwriteFlags. |
|
static |
Encodes an image into a memory buffer.
The function imencode compresses the image and stores it in the memory buffer that is resized to fit the result. See cv::imwrite for the list of supported formats and flags description.
ext | File extension that defines the output format. Must include a leading period. |
img | Image to be written. |
buf | Output buffer resized to fit the compressed image. |
params | Format-specific parameters. See cv::imwrite and cv::ImwriteFlags. |
|
static |
Loads an image from a file.
The function imread loads an image from the specified file and returns it. If the image cannot be read (because of missing file, improper permissions, unsupported or invalid format), the function returns an empty matrix ( Mat::data==NULL ).
Currently, the following file formats are supported:
filename | Name of file to be loaded. |
flags | Flag that can take values of cv::ImreadModes |
|
static |
Loads an image from a file.
The function imread loads an image from the specified file and returns it. If the image cannot be read (because of missing file, improper permissions, unsupported or invalid format), the function returns an empty matrix ( Mat::data==NULL ).
Currently, the following file formats are supported:
filename | Name of file to be loaded. |
flags | Flag that can take values of cv::ImreadModes |
|
static |
Loads an image from a file.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts and the return value.
filename | Name of file to be loaded. |
dst | object in which the image will be loaded. |
flags | Flag that can take values of cv::ImreadModes |
The image passing through the img parameter can be pre-allocated. The memory is reused if the shape and the type match with the load image.
|
static |
Loads an image from a file.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts and the return value.
filename | Name of file to be loaded. |
dst | object in which the image will be loaded. |
flags | Flag that can take values of cv::ImreadModes |
The image passing through the img parameter can be pre-allocated. The memory is reused if the shape and the type match with the load image.
|
static |
Loads a multi-page image from a file.
The function imreadmulti loads a multi-page image from the specified file into a vector of Mat objects.
filename | Name of file to be loaded. |
mats | A vector of Mat objects holding each page. |
flags | Flag that can take values of cv::ImreadModes, default with cv::IMREAD_ANYCOLOR. |
cv::imread
|
static |
Loads a multi-page image from a file.
The function imreadmulti loads a multi-page image from the specified file into a vector of Mat objects.
filename | Name of file to be loaded. |
mats | A vector of Mat objects holding each page. |
flags | Flag that can take values of cv::ImreadModes, default with cv::IMREAD_ANYCOLOR. |
cv::imread
|
static |
Loads a of images of a multi-page image from a file.
The function imreadmulti loads a specified range from a multi-page image from the specified file into a vector of Mat objects.
filename | Name of file to be loaded. |
mats | A vector of Mat objects holding each page. |
start | Start index of the image to load |
count | Count number of images to load |
flags | Flag that can take values of cv::ImreadModes, default with cv::IMREAD_ANYCOLOR. |
cv::imread
|
static |
Loads a of images of a multi-page image from a file.
The function imreadmulti loads a specified range from a multi-page image from the specified file into a vector of Mat objects.
filename | Name of file to be loaded. |
mats | A vector of Mat objects holding each page. |
start | Start index of the image to load |
count | Count number of images to load |
flags | Flag that can take values of cv::ImreadModes, default with cv::IMREAD_ANYCOLOR. |
cv::imread
|
static |
Saves an image to a specified file.
The function imwrite saves the image to the specified file. The image format is chosen based on the filename extension (see cv::imread for the list of extensions). In general, only 8-bit unsigned (CV_8U) single-channel or 3-channel (with 'BGR' channel order) images can be saved using this function, with these exceptions:
If the image format is not supported, the image will be converted to 8-bit unsigned (CV_8U) and saved that way.
If the format, depth or channel order is different, use Mat.convertTo and cv::cvtColor to convert it before saving. Or, use the universal FileStorage I/O functions to save the image to XML or YAML format.
The sample below shows how to create a BGRA image, how to set custom compression parameters and save it to a PNG file. It also demonstrates how to save multiple images in a TIFF file:
filename | Name of the file. |
img | (Mat or vector of Mat) Image or Images to be saved. |
params | Format-specific parameters encoded as pairs (paramId_1, paramValue_1, paramId_2, paramValue_2, ... .) see cv::ImwriteFlags |
|
static |
Saves an image to a specified file.
The function imwrite saves the image to the specified file. The image format is chosen based on the filename extension (see cv::imread for the list of extensions). In general, only 8-bit unsigned (CV_8U) single-channel or 3-channel (with 'BGR' channel order) images can be saved using this function, with these exceptions:
If the image format is not supported, the image will be converted to 8-bit unsigned (CV_8U) and saved that way.
If the format, depth or channel order is different, use Mat.convertTo and cv::cvtColor to convert it before saving. Or, use the universal FileStorage I/O functions to save the image to XML or YAML format.
The sample below shows how to create a BGRA image, how to set custom compression parameters and save it to a PNG file. It also demonstrates how to save multiple images in a TIFF file:
filename | Name of the file. |
img | (Mat or vector of Mat) Image or Images to be saved. |
params | Format-specific parameters encoded as pairs (paramId_1, paramValue_1, paramId_2, paramValue_2, ... .) see cv::ImwriteFlags |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |