Imgcodecs.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  1. //
  2. // This file is auto-generated. Please don't modify it!
  3. //
  4. #pragma once
  5. #ifdef __cplusplus
  6. //#import "opencv.hpp"
  7. #import "opencv2/imgcodecs.hpp"
  8. #else
  9. #define CV_EXPORTS
  10. #endif
  11. #import <Foundation/Foundation.h>
  12. @class ByteVector;
  13. @class IntVector;
  14. @class Mat;
  15. // C++: enum ImreadModes (cv.ImreadModes)
  16. typedef NS_ENUM(int, ImreadModes) {
  17. IMREAD_UNCHANGED = -1,
  18. IMREAD_GRAYSCALE = 0,
  19. IMREAD_COLOR = 1,
  20. IMREAD_ANYDEPTH = 2,
  21. IMREAD_ANYCOLOR = 4,
  22. IMREAD_LOAD_GDAL = 8,
  23. IMREAD_REDUCED_GRAYSCALE_2 = 16,
  24. IMREAD_REDUCED_COLOR_2 = 17,
  25. IMREAD_REDUCED_GRAYSCALE_4 = 32,
  26. IMREAD_REDUCED_COLOR_4 = 33,
  27. IMREAD_REDUCED_GRAYSCALE_8 = 64,
  28. IMREAD_REDUCED_COLOR_8 = 65,
  29. IMREAD_IGNORE_ORIENTATION = 128
  30. };
  31. // C++: enum ImwriteEXRCompressionFlags (cv.ImwriteEXRCompressionFlags)
  32. typedef NS_ENUM(int, ImwriteEXRCompressionFlags) {
  33. IMWRITE_EXR_COMPRESSION_NO = 0,
  34. IMWRITE_EXR_COMPRESSION_RLE = 1,
  35. IMWRITE_EXR_COMPRESSION_ZIPS = 2,
  36. IMWRITE_EXR_COMPRESSION_ZIP = 3,
  37. IMWRITE_EXR_COMPRESSION_PIZ = 4,
  38. IMWRITE_EXR_COMPRESSION_PXR24 = 5,
  39. IMWRITE_EXR_COMPRESSION_B44 = 6,
  40. IMWRITE_EXR_COMPRESSION_B44A = 7,
  41. IMWRITE_EXR_COMPRESSION_DWAA = 8,
  42. IMWRITE_EXR_COMPRESSION_DWAB = 9
  43. };
  44. // C++: enum ImwriteEXRTypeFlags (cv.ImwriteEXRTypeFlags)
  45. typedef NS_ENUM(int, ImwriteEXRTypeFlags) {
  46. IMWRITE_EXR_TYPE_HALF = 1,
  47. IMWRITE_EXR_TYPE_FLOAT = 2
  48. };
  49. // C++: enum ImwriteFlags (cv.ImwriteFlags)
  50. typedef NS_ENUM(int, ImwriteFlags) {
  51. IMWRITE_JPEG_QUALITY = 1,
  52. IMWRITE_JPEG_PROGRESSIVE = 2,
  53. IMWRITE_JPEG_OPTIMIZE = 3,
  54. IMWRITE_JPEG_RST_INTERVAL = 4,
  55. IMWRITE_JPEG_LUMA_QUALITY = 5,
  56. IMWRITE_JPEG_CHROMA_QUALITY = 6,
  57. IMWRITE_PNG_COMPRESSION = 16,
  58. IMWRITE_PNG_STRATEGY = 17,
  59. IMWRITE_PNG_BILEVEL = 18,
  60. IMWRITE_PXM_BINARY = 32,
  61. IMWRITE_EXR_TYPE = (3 << 4) + 0,
  62. IMWRITE_EXR_COMPRESSION = (3 << 4) + 1,
  63. IMWRITE_WEBP_QUALITY = 64,
  64. IMWRITE_PAM_TUPLETYPE = 128,
  65. IMWRITE_TIFF_RESUNIT = 256,
  66. IMWRITE_TIFF_XDPI = 257,
  67. IMWRITE_TIFF_YDPI = 258,
  68. IMWRITE_TIFF_COMPRESSION = 259,
  69. IMWRITE_JPEG2000_COMPRESSION_X1000 = 272
  70. };
  71. // C++: enum ImwritePAMFlags (cv.ImwritePAMFlags)
  72. typedef NS_ENUM(int, ImwritePAMFlags) {
  73. IMWRITE_PAM_FORMAT_NULL = 0,
  74. IMWRITE_PAM_FORMAT_BLACKANDWHITE = 1,
  75. IMWRITE_PAM_FORMAT_GRAYSCALE = 2,
  76. IMWRITE_PAM_FORMAT_GRAYSCALE_ALPHA = 3,
  77. IMWRITE_PAM_FORMAT_RGB = 4,
  78. IMWRITE_PAM_FORMAT_RGB_ALPHA = 5
  79. };
  80. // C++: enum ImwritePNGFlags (cv.ImwritePNGFlags)
  81. typedef NS_ENUM(int, ImwritePNGFlags) {
  82. IMWRITE_PNG_STRATEGY_DEFAULT = 0,
  83. IMWRITE_PNG_STRATEGY_FILTERED = 1,
  84. IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY = 2,
  85. IMWRITE_PNG_STRATEGY_RLE = 3,
  86. IMWRITE_PNG_STRATEGY_FIXED = 4
  87. };
  88. NS_ASSUME_NONNULL_BEGIN
  89. // C++: class Imgcodecs
  90. /**
  91. * The Imgcodecs module
  92. *
  93. * Member of `Imgcodecs`
  94. * Member enums: `ImreadModes`, `ImwriteFlags`, `ImwriteEXRTypeFlags`, `ImwriteEXRCompressionFlags`, `ImwritePNGFlags`, `ImwritePAMFlags`
  95. */
  96. CV_EXPORTS @interface Imgcodecs : NSObject
  97. #pragma mark - Methods
  98. //
  99. // Mat cv::imread(String filename, int flags = IMREAD_COLOR)
  100. //
  101. /**
  102. * Loads an image from a file.
  103. *
  104. * imread
  105. *
  106. * The function imread loads an image from the specified file and returns it. If the image cannot be
  107. * read (because of missing file, improper permissions, unsupported or invalid format), the function
  108. * returns an empty matrix ( Mat::data==NULL ).
  109. *
  110. * Currently, the following file formats are supported:
  111. *
  112. * - Windows bitmaps - \*.bmp, \*.dib (always supported)
  113. * - JPEG files - \*.jpeg, \*.jpg, \*.jpe (see the *Note* section)
  114. * - JPEG 2000 files - \*.jp2 (see the *Note* section)
  115. * - Portable Network Graphics - \*.png (see the *Note* section)
  116. * - WebP - \*.webp (see the *Note* section)
  117. * - Portable image format - \*.pbm, \*.pgm, \*.ppm \*.pxm, \*.pnm (always supported)
  118. * - PFM files - \*.pfm (see the *Note* section)
  119. * - Sun rasters - \*.sr, \*.ras (always supported)
  120. * - TIFF files - \*.tiff, \*.tif (see the *Note* section)
  121. * - OpenEXR Image files - \*.exr (see the *Note* section)
  122. * - Radiance HDR - \*.hdr, \*.pic (always supported)
  123. * - Raster and Vector geospatial data supported by GDAL (see the *Note* section)
  124. *
  125. * NOTE:
  126. * - The function determines the type of an image by the content, not by the file extension.
  127. * - In the case of color images, the decoded images will have the channels stored in **B G R** order.
  128. * - When using IMREAD_GRAYSCALE, the codec's internal grayscale conversion will be used, if available.
  129. * Results may differ to the output of cvtColor()
  130. * - On Microsoft Windows\* OS and MacOSX\*, the codecs shipped with an OpenCV image (libjpeg,
  131. * libpng, libtiff, and libjasper) are used by default. So, OpenCV can always read JPEGs, PNGs,
  132. * and TIFFs. On MacOSX, there is also an option to use native MacOSX image readers. But beware
  133. * that currently these native image loaders give images with different pixel values because of
  134. * the color management embedded into MacOSX.
  135. * - On Linux\*, BSD flavors and other Unix-like open-source operating systems, OpenCV looks for
  136. * codecs supplied with an OS image. Install the relevant packages (do not forget the development
  137. * files, for example, "libjpeg-dev", in Debian\* and Ubuntu\*) to get the codec support or turn
  138. * on the OPENCV_BUILD_3RDPARTY_LIBS flag in CMake.
  139. * - In the case you set *WITH_GDAL* flag to true in CMake and REF: IMREAD_LOAD_GDAL to load the image,
  140. * then the [GDAL](http://www.gdal.org) driver will be used in order to decode the image, supporting
  141. * the following formats: [Raster](http://www.gdal.org/formats_list.html),
  142. * [Vector](http://www.gdal.org/ogr_formats.html).
  143. * - If EXIF information is embedded in the image file, the EXIF orientation will be taken into account
  144. * and thus the image will be rotated accordingly except if the flags REF: IMREAD_IGNORE_ORIENTATION
  145. * or REF: IMREAD_UNCHANGED are passed.
  146. * - Use the IMREAD_UNCHANGED flag to keep the floating point values from PFM image.
  147. * - By default number of pixels must be less than 2^30. Limit can be set using system
  148. * variable OPENCV_IO_MAX_IMAGE_PIXELS
  149. *
  150. * @param filename Name of file to be loaded.
  151. * @param flags Flag that can take values of cv::ImreadModes
  152. */
  153. + (Mat*)imread:(NSString*)filename flags:(int)flags NS_SWIFT_NAME(imread(filename:flags:));
  154. /**
  155. * Loads an image from a file.
  156. *
  157. * imread
  158. *
  159. * The function imread loads an image from the specified file and returns it. If the image cannot be
  160. * read (because of missing file, improper permissions, unsupported or invalid format), the function
  161. * returns an empty matrix ( Mat::data==NULL ).
  162. *
  163. * Currently, the following file formats are supported:
  164. *
  165. * - Windows bitmaps - \*.bmp, \*.dib (always supported)
  166. * - JPEG files - \*.jpeg, \*.jpg, \*.jpe (see the *Note* section)
  167. * - JPEG 2000 files - \*.jp2 (see the *Note* section)
  168. * - Portable Network Graphics - \*.png (see the *Note* section)
  169. * - WebP - \*.webp (see the *Note* section)
  170. * - Portable image format - \*.pbm, \*.pgm, \*.ppm \*.pxm, \*.pnm (always supported)
  171. * - PFM files - \*.pfm (see the *Note* section)
  172. * - Sun rasters - \*.sr, \*.ras (always supported)
  173. * - TIFF files - \*.tiff, \*.tif (see the *Note* section)
  174. * - OpenEXR Image files - \*.exr (see the *Note* section)
  175. * - Radiance HDR - \*.hdr, \*.pic (always supported)
  176. * - Raster and Vector geospatial data supported by GDAL (see the *Note* section)
  177. *
  178. * NOTE:
  179. * - The function determines the type of an image by the content, not by the file extension.
  180. * - In the case of color images, the decoded images will have the channels stored in **B G R** order.
  181. * - When using IMREAD_GRAYSCALE, the codec's internal grayscale conversion will be used, if available.
  182. * Results may differ to the output of cvtColor()
  183. * - On Microsoft Windows\* OS and MacOSX\*, the codecs shipped with an OpenCV image (libjpeg,
  184. * libpng, libtiff, and libjasper) are used by default. So, OpenCV can always read JPEGs, PNGs,
  185. * and TIFFs. On MacOSX, there is also an option to use native MacOSX image readers. But beware
  186. * that currently these native image loaders give images with different pixel values because of
  187. * the color management embedded into MacOSX.
  188. * - On Linux\*, BSD flavors and other Unix-like open-source operating systems, OpenCV looks for
  189. * codecs supplied with an OS image. Install the relevant packages (do not forget the development
  190. * files, for example, "libjpeg-dev", in Debian\* and Ubuntu\*) to get the codec support or turn
  191. * on the OPENCV_BUILD_3RDPARTY_LIBS flag in CMake.
  192. * - In the case you set *WITH_GDAL* flag to true in CMake and REF: IMREAD_LOAD_GDAL to load the image,
  193. * then the [GDAL](http://www.gdal.org) driver will be used in order to decode the image, supporting
  194. * the following formats: [Raster](http://www.gdal.org/formats_list.html),
  195. * [Vector](http://www.gdal.org/ogr_formats.html).
  196. * - If EXIF information is embedded in the image file, the EXIF orientation will be taken into account
  197. * and thus the image will be rotated accordingly except if the flags REF: IMREAD_IGNORE_ORIENTATION
  198. * or REF: IMREAD_UNCHANGED are passed.
  199. * - Use the IMREAD_UNCHANGED flag to keep the floating point values from PFM image.
  200. * - By default number of pixels must be less than 2^30. Limit can be set using system
  201. * variable OPENCV_IO_MAX_IMAGE_PIXELS
  202. *
  203. * @param filename Name of file to be loaded.
  204. */
  205. + (Mat*)imread:(NSString*)filename NS_SWIFT_NAME(imread(filename:));
  206. //
  207. // bool cv::imreadmulti(String filename, vector_Mat& mats, int flags = IMREAD_ANYCOLOR)
  208. //
  209. /**
  210. * Loads a multi-page image from a file.
  211. *
  212. * The function imreadmulti loads a multi-page image from the specified file into a vector of Mat objects.
  213. * @param filename Name of file to be loaded.
  214. * @param mats A vector of Mat objects holding each page.
  215. * @param flags Flag that can take values of cv::ImreadModes, default with cv::IMREAD_ANYCOLOR.
  216. * @see `cv::imread`
  217. */
  218. + (BOOL)imreadmulti:(NSString*)filename mats:(NSMutableArray<Mat*>*)mats flags:(int)flags NS_SWIFT_NAME(imreadmulti(filename:mats:flags:));
  219. /**
  220. * Loads a multi-page image from a file.
  221. *
  222. * The function imreadmulti loads a multi-page image from the specified file into a vector of Mat objects.
  223. * @param filename Name of file to be loaded.
  224. * @param mats A vector of Mat objects holding each page.
  225. * @see `cv::imread`
  226. */
  227. + (BOOL)imreadmulti:(NSString*)filename mats:(NSMutableArray<Mat*>*)mats NS_SWIFT_NAME(imreadmulti(filename:mats:));
  228. //
  229. // bool cv::imreadmulti(String filename, vector_Mat& mats, int start, int count, int flags = IMREAD_ANYCOLOR)
  230. //
  231. /**
  232. * Loads a of images of a multi-page image from a file.
  233. *
  234. * The function imreadmulti loads a specified range from a multi-page image from the specified file into a vector of Mat objects.
  235. * @param filename Name of file to be loaded.
  236. * @param mats A vector of Mat objects holding each page.
  237. * @param start Start index of the image to load
  238. * @param count Count number of images to load
  239. * @param flags Flag that can take values of cv::ImreadModes, default with cv::IMREAD_ANYCOLOR.
  240. * @see `cv::imread`
  241. */
  242. + (BOOL)imreadmulti:(NSString*)filename mats:(NSMutableArray<Mat*>*)mats start:(int)start count:(int)count flags:(int)flags NS_SWIFT_NAME(imreadmulti(filename:mats:start:count:flags:));
  243. /**
  244. * Loads a of images of a multi-page image from a file.
  245. *
  246. * The function imreadmulti loads a specified range from a multi-page image from the specified file into a vector of Mat objects.
  247. * @param filename Name of file to be loaded.
  248. * @param mats A vector of Mat objects holding each page.
  249. * @param start Start index of the image to load
  250. * @param count Count number of images to load
  251. * @see `cv::imread`
  252. */
  253. + (BOOL)imreadmulti:(NSString*)filename mats:(NSMutableArray<Mat*>*)mats start:(int)start count:(int)count NS_SWIFT_NAME(imreadmulti(filename:mats:start:count:));
  254. //
  255. // size_t cv::imcount(String filename, int flags = IMREAD_ANYCOLOR)
  256. //
  257. /**
  258. * Returns the number of images inside the give file
  259. *
  260. * The function imcount will return the number of pages in a multi-page image, or 1 for single-page images
  261. * @param filename Name of file to be loaded.
  262. * @param flags Flag that can take values of cv::ImreadModes, default with cv::IMREAD_ANYCOLOR.
  263. */
  264. + (size_t)imcount:(NSString*)filename flags:(int)flags NS_SWIFT_NAME(imcount(filename:flags:));
  265. /**
  266. * Returns the number of images inside the give file
  267. *
  268. * The function imcount will return the number of pages in a multi-page image, or 1 for single-page images
  269. * @param filename Name of file to be loaded.
  270. */
  271. + (size_t)imcount:(NSString*)filename NS_SWIFT_NAME(imcount(filename:));
  272. //
  273. // bool cv::imwrite(String filename, Mat img, vector_int params = std::vector<int>())
  274. //
  275. /**
  276. * Saves an image to a specified file.
  277. *
  278. * The function imwrite saves the image to the specified file. The image format is chosen based on the
  279. * filename extension (see cv::imread for the list of extensions). In general, only 8-bit
  280. * single-channel or 3-channel (with 'BGR' channel order) images
  281. * can be saved using this function, with these exceptions:
  282. *
  283. * - 16-bit unsigned (CV_16U) images can be saved in the case of PNG, JPEG 2000, and TIFF formats
  284. * - 32-bit float (CV_32F) images can be saved in PFM, TIFF, OpenEXR, and Radiance HDR formats;
  285. * 3-channel (CV_32FC3) TIFF images will be saved using the LogLuv high dynamic range encoding
  286. * (4 bytes per pixel)
  287. * - PNG images with an alpha channel can be saved using this function. To do this, create
  288. * 8-bit (or 16-bit) 4-channel image BGRA, where the alpha channel goes last. Fully transparent pixels
  289. * should have alpha set to 0, fully opaque pixels should have alpha set to 255/65535 (see the code sample below).
  290. * - Multiple images (vector of Mat) can be saved in TIFF format (see the code sample below).
  291. *
  292. * If the image format is not supported, the image will be converted to 8-bit unsigned (CV_8U) and saved that way.
  293. *
  294. * If the format, depth or channel order is different, use
  295. * Mat::convertTo and cv::cvtColor to convert it before saving. Or, use the universal FileStorage I/O
  296. * functions to save the image to XML or YAML format.
  297. *
  298. * The sample below shows how to create a BGRA image, how to set custom compression parameters and save it to a PNG file.
  299. * It also demonstrates how to save multiple images in a TIFF file:
  300. * INCLUDE: snippets/imgcodecs_imwrite.cpp
  301. * @param filename Name of the file.
  302. * @param img (Mat or vector of Mat) Image or Images to be saved.
  303. * @param params Format-specific parameters encoded as pairs (paramId_1, paramValue_1, paramId_2, paramValue_2, ... .) see cv::ImwriteFlags
  304. */
  305. + (BOOL)imwrite:(NSString*)filename img:(Mat*)img params:(IntVector*)params NS_SWIFT_NAME(imwrite(filename:img:params:));
  306. /**
  307. * Saves an image to a specified file.
  308. *
  309. * The function imwrite saves the image to the specified file. The image format is chosen based on the
  310. * filename extension (see cv::imread for the list of extensions). In general, only 8-bit
  311. * single-channel or 3-channel (with 'BGR' channel order) images
  312. * can be saved using this function, with these exceptions:
  313. *
  314. * - 16-bit unsigned (CV_16U) images can be saved in the case of PNG, JPEG 2000, and TIFF formats
  315. * - 32-bit float (CV_32F) images can be saved in PFM, TIFF, OpenEXR, and Radiance HDR formats;
  316. * 3-channel (CV_32FC3) TIFF images will be saved using the LogLuv high dynamic range encoding
  317. * (4 bytes per pixel)
  318. * - PNG images with an alpha channel can be saved using this function. To do this, create
  319. * 8-bit (or 16-bit) 4-channel image BGRA, where the alpha channel goes last. Fully transparent pixels
  320. * should have alpha set to 0, fully opaque pixels should have alpha set to 255/65535 (see the code sample below).
  321. * - Multiple images (vector of Mat) can be saved in TIFF format (see the code sample below).
  322. *
  323. * If the image format is not supported, the image will be converted to 8-bit unsigned (CV_8U) and saved that way.
  324. *
  325. * If the format, depth or channel order is different, use
  326. * Mat::convertTo and cv::cvtColor to convert it before saving. Or, use the universal FileStorage I/O
  327. * functions to save the image to XML or YAML format.
  328. *
  329. * The sample below shows how to create a BGRA image, how to set custom compression parameters and save it to a PNG file.
  330. * It also demonstrates how to save multiple images in a TIFF file:
  331. * INCLUDE: snippets/imgcodecs_imwrite.cpp
  332. * @param filename Name of the file.
  333. * @param img (Mat or vector of Mat) Image or Images to be saved.
  334. */
  335. + (BOOL)imwrite:(NSString*)filename img:(Mat*)img NS_SWIFT_NAME(imwrite(filename:img:));
  336. //
  337. // bool cv::imwritemulti(String filename, vector_Mat img, vector_int params = std::vector<int>())
  338. //
  339. + (BOOL)imwritemulti:(NSString*)filename img:(NSArray<Mat*>*)img params:(IntVector*)params NS_SWIFT_NAME(imwritemulti(filename:img:params:));
  340. + (BOOL)imwritemulti:(NSString*)filename img:(NSArray<Mat*>*)img NS_SWIFT_NAME(imwritemulti(filename:img:));
  341. //
  342. // Mat cv::imdecode(Mat buf, int flags)
  343. //
  344. /**
  345. * Reads an image from a buffer in memory.
  346. *
  347. * The function imdecode reads an image from the specified buffer in the memory. If the buffer is too short or
  348. * contains invalid data, the function returns an empty matrix ( Mat::data==NULL ).
  349. *
  350. * See cv::imread for the list of supported formats and flags description.
  351. *
  352. * NOTE: In the case of color images, the decoded images will have the channels stored in **B G R** order.
  353. * @param buf Input array or vector of bytes.
  354. * @param flags The same flags as in cv::imread, see cv::ImreadModes.
  355. */
  356. + (Mat*)imdecode:(Mat*)buf flags:(int)flags NS_SWIFT_NAME(imdecode(buf:flags:));
  357. //
  358. // bool cv::imencode(String ext, Mat img, vector_uchar& buf, vector_int params = std::vector<int>())
  359. //
  360. /**
  361. * Encodes an image into a memory buffer.
  362. *
  363. * The function imencode compresses the image and stores it in the memory buffer that is resized to fit the
  364. * result. See cv::imwrite for the list of supported formats and flags description.
  365. *
  366. * @param ext File extension that defines the output format. Must include a leading period.
  367. * @param img Image to be written.
  368. * @param buf Output buffer resized to fit the compressed image.
  369. * @param params Format-specific parameters. See cv::imwrite and cv::ImwriteFlags.
  370. */
  371. + (BOOL)imencode:(NSString*)ext img:(Mat*)img buf:(ByteVector*)buf params:(IntVector*)params NS_SWIFT_NAME(imencode(ext:img:buf:params:));
  372. /**
  373. * Encodes an image into a memory buffer.
  374. *
  375. * The function imencode compresses the image and stores it in the memory buffer that is resized to fit the
  376. * result. See cv::imwrite for the list of supported formats and flags description.
  377. *
  378. * @param ext File extension that defines the output format. Must include a leading period.
  379. * @param img Image to be written.
  380. * @param buf Output buffer resized to fit the compressed image.
  381. */
  382. + (BOOL)imencode:(NSString*)ext img:(Mat*)img buf:(ByteVector*)buf NS_SWIFT_NAME(imencode(ext:img:buf:));
  383. //
  384. // bool cv::haveImageReader(String filename)
  385. //
  386. /**
  387. * Returns true if the specified image can be decoded by OpenCV
  388. *
  389. * @param filename File name of the image
  390. */
  391. + (BOOL)haveImageReader:(NSString*)filename NS_SWIFT_NAME(haveImageReader(filename:));
  392. //
  393. // bool cv::haveImageWriter(String filename)
  394. //
  395. /**
  396. * Returns true if an image with the specified filename can be encoded by OpenCV
  397. *
  398. * @param filename File name of the image
  399. */
  400. + (BOOL)haveImageWriter:(NSString*)filename NS_SWIFT_NAME(haveImageWriter(filename:));
  401. @end
  402. NS_ASSUME_NONNULL_END