Joe Verbout / Mbed 2 deprecated main

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers imgcodecs_c.h Source File

imgcodecs_c.h

00001 /*M///////////////////////////////////////////////////////////////////////////////////////
00002 //
00003 //  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
00004 //
00005 //  By downloading, copying, installing or using the software you agree to this license.
00006 //  If you do not agree to this license, do not download, install,
00007 //  copy or use the software.
00008 //
00009 //
00010 //                        Intel License Agreement
00011 //                For Open Source Computer Vision Library
00012 //
00013 // Copyright (C) 2000, Intel Corporation, all rights reserved.
00014 // Third party copyrights are property of their respective owners.
00015 //
00016 // Redistribution and use in source and binary forms, with or without modification,
00017 // are permitted provided that the following conditions are met:
00018 //
00019 //   * Redistribution's of source code must retain the above copyright notice,
00020 //     this list of conditions and the following disclaimer.
00021 //
00022 //   * Redistribution's in binary form must reproduce the above copyright notice,
00023 //     this list of conditions and the following disclaimer in the documentation
00024 //     and/or other materials provided with the distribution.
00025 //
00026 //   * The name of Intel Corporation may not be used to endorse or promote products
00027 //     derived from this software without specific prior written permission.
00028 //
00029 // This software is provided by the copyright holders and contributors "as is" and
00030 // any express or implied warranties, including, but not limited to, the implied
00031 // warranties of merchantability and fitness for a particular purpose are disclaimed.
00032 // In no event shall the Intel Corporation or contributors be liable for any direct,
00033 // indirect, incidental, special, exemplary, or consequential damages
00034 // (including, but not limited to, procurement of substitute goods or services;
00035 // loss of use, data, or profits; or business interruption) however caused
00036 // and on any theory of liability, whether in contract, strict liability,
00037 // or tort (including negligence or otherwise) arising in any way out of
00038 // the use of this software, even if advised of the possibility of such damage.
00039 //
00040 //M*/
00041 
00042 #ifndef __OPENCV_IMGCODECS_H__
00043 #define __OPENCV_IMGCODECS_H__
00044 
00045 #include "opencv2/core/core_c.h"
00046 
00047 #ifdef __cplusplus
00048 extern "C" {
00049 #endif /* __cplusplus */
00050 
00051 /** @addtogroup imgcodecs_c
00052   @{
00053   */
00054 
00055 enum
00056 {
00057 /* 8bit, color or not */
00058     CV_LOAD_IMAGE_UNCHANGED  =-1,
00059 /* 8bit, gray */
00060     CV_LOAD_IMAGE_GRAYSCALE  =0,
00061 /* ?, color */
00062     CV_LOAD_IMAGE_COLOR      =1,
00063 /* any depth, ? */
00064     CV_LOAD_IMAGE_ANYDEPTH   =2,
00065 /* ?, any color */
00066     CV_LOAD_IMAGE_ANYCOLOR   =4
00067 };
00068 
00069 /* load image from file
00070   iscolor can be a combination of above flags where CV_LOAD_IMAGE_UNCHANGED
00071   overrides the other flags
00072   using CV_LOAD_IMAGE_ANYCOLOR alone is equivalent to CV_LOAD_IMAGE_UNCHANGED
00073   unless CV_LOAD_IMAGE_ANYDEPTH is specified images are converted to 8bit
00074 */
00075 CVAPI(IplImage*) cvLoadImage( const char* filename, int iscolor CV_DEFAULT(CV_LOAD_IMAGE_COLOR));
00076 CVAPI(CvMat*) cvLoadImageM( const char* filename, int iscolor CV_DEFAULT(CV_LOAD_IMAGE_COLOR));
00077 
00078 enum
00079 {
00080     CV_IMWRITE_JPEG_QUALITY =1,
00081     CV_IMWRITE_JPEG_PROGRESSIVE =2,
00082     CV_IMWRITE_JPEG_OPTIMIZE =3,
00083     CV_IMWRITE_JPEG_RST_INTERVAL =4,
00084     CV_IMWRITE_JPEG_LUMA_QUALITY =5,
00085     CV_IMWRITE_JPEG_CHROMA_QUALITY =6,
00086     CV_IMWRITE_PNG_COMPRESSION =16,
00087     CV_IMWRITE_PNG_STRATEGY =17,
00088     CV_IMWRITE_PNG_BILEVEL =18,
00089     CV_IMWRITE_PNG_STRATEGY_DEFAULT =0,
00090     CV_IMWRITE_PNG_STRATEGY_FILTERED =1,
00091     CV_IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY =2,
00092     CV_IMWRITE_PNG_STRATEGY_RLE =3,
00093     CV_IMWRITE_PNG_STRATEGY_FIXED =4,
00094     CV_IMWRITE_PXM_BINARY =32,
00095     CV_IMWRITE_WEBP_QUALITY =64
00096 };
00097 
00098 /* save image to file */
00099 CVAPI(int) cvSaveImage( const char* filename, const CvArr* image,
00100                         const int* params CV_DEFAULT(0) );
00101 
00102 /* decode image stored in the buffer */
00103 CVAPI(IplImage*) cvDecodeImage( const CvMat* buf, int iscolor CV_DEFAULT(CV_LOAD_IMAGE_COLOR));
00104 CVAPI(CvMat*) cvDecodeImageM( const CvMat* buf, int iscolor CV_DEFAULT(CV_LOAD_IMAGE_COLOR));
00105 
00106 /* encode image and store the result as a byte vector (single-row 8uC1 matrix) */
00107 CVAPI(CvMat*) cvEncodeImage( const char* ext, const CvArr* image,
00108                              const int* params CV_DEFAULT(0) );
00109 
00110 enum
00111 {
00112     CV_CVTIMG_FLIP      =1,
00113     CV_CVTIMG_SWAP_RB   =2
00114 };
00115 
00116 /* utility function: convert one image to another with optional vertical flip */
00117 CVAPI(void) cvConvertImage( const CvArr* src, CvArr* dst, int flags CV_DEFAULT(0));
00118 
00119 CVAPI(int) cvHaveImageReader(const char* filename);
00120 CVAPI(int) cvHaveImageWriter(const char* filename);
00121 
00122 
00123 /****************************************************************************************\
00124 *                              Obsolete functions/synonyms                               *
00125 \****************************************************************************************/
00126 
00127 #define cvvLoadImage(name) cvLoadImage((name),1)
00128 #define cvvSaveImage cvSaveImage
00129 #define cvvConvertImage cvConvertImage
00130 
00131 /** @} imgcodecs_c */
00132 
00133 #ifdef __cplusplus
00134 }
00135 #endif
00136 
00137 #endif // __OPENCV_IMGCODECS_H__
00138