openCV library for Renesas RZ/A

Dependents:   RZ_A2M_Mbed_samples

Committer:
RyoheiHagimoto
Date:
Fri Jan 29 04:53:38 2021 +0000
Revision:
0:0e0631af0305
copied from https://github.com/d-kato/opencv-lib.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
RyoheiHagimoto 0:0e0631af0305 1 /*M///////////////////////////////////////////////////////////////////////////////////////
RyoheiHagimoto 0:0e0631af0305 2 //
RyoheiHagimoto 0:0e0631af0305 3 // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
RyoheiHagimoto 0:0e0631af0305 4 //
RyoheiHagimoto 0:0e0631af0305 5 // By downloading, copying, installing or using the software you agree to this license.
RyoheiHagimoto 0:0e0631af0305 6 // If you do not agree to this license, do not download, install,
RyoheiHagimoto 0:0e0631af0305 7 // copy or use the software.
RyoheiHagimoto 0:0e0631af0305 8 //
RyoheiHagimoto 0:0e0631af0305 9 //
RyoheiHagimoto 0:0e0631af0305 10 // Intel License Agreement
RyoheiHagimoto 0:0e0631af0305 11 // For Open Source Computer Vision Library
RyoheiHagimoto 0:0e0631af0305 12 //
RyoheiHagimoto 0:0e0631af0305 13 // Copyright (C) 2000, Intel Corporation, all rights reserved.
RyoheiHagimoto 0:0e0631af0305 14 // Third party copyrights are property of their respective owners.
RyoheiHagimoto 0:0e0631af0305 15 //
RyoheiHagimoto 0:0e0631af0305 16 // Redistribution and use in source and binary forms, with or without modification,
RyoheiHagimoto 0:0e0631af0305 17 // are permitted provided that the following conditions are met:
RyoheiHagimoto 0:0e0631af0305 18 //
RyoheiHagimoto 0:0e0631af0305 19 // * Redistribution's of source code must retain the above copyright notice,
RyoheiHagimoto 0:0e0631af0305 20 // this list of conditions and the following disclaimer.
RyoheiHagimoto 0:0e0631af0305 21 //
RyoheiHagimoto 0:0e0631af0305 22 // * Redistribution's in binary form must reproduce the above copyright notice,
RyoheiHagimoto 0:0e0631af0305 23 // this list of conditions and the following disclaimer in the documentation
RyoheiHagimoto 0:0e0631af0305 24 // and/or other materials provided with the distribution.
RyoheiHagimoto 0:0e0631af0305 25 //
RyoheiHagimoto 0:0e0631af0305 26 // * The name of Intel Corporation may not be used to endorse or promote products
RyoheiHagimoto 0:0e0631af0305 27 // derived from this software without specific prior written permission.
RyoheiHagimoto 0:0e0631af0305 28 //
RyoheiHagimoto 0:0e0631af0305 29 // This software is provided by the copyright holders and contributors "as is" and
RyoheiHagimoto 0:0e0631af0305 30 // any express or implied warranties, including, but not limited to, the implied
RyoheiHagimoto 0:0e0631af0305 31 // warranties of merchantability and fitness for a particular purpose are disclaimed.
RyoheiHagimoto 0:0e0631af0305 32 // In no event shall the Intel Corporation or contributors be liable for any direct,
RyoheiHagimoto 0:0e0631af0305 33 // indirect, incidental, special, exemplary, or consequential damages
RyoheiHagimoto 0:0e0631af0305 34 // (including, but not limited to, procurement of substitute goods or services;
RyoheiHagimoto 0:0e0631af0305 35 // loss of use, data, or profits; or business interruption) however caused
RyoheiHagimoto 0:0e0631af0305 36 // and on any theory of liability, whether in contract, strict liability,
RyoheiHagimoto 0:0e0631af0305 37 // or tort (including negligence or otherwise) arising in any way out of
RyoheiHagimoto 0:0e0631af0305 38 // the use of this software, even if advised of the possibility of such damage.
RyoheiHagimoto 0:0e0631af0305 39 //
RyoheiHagimoto 0:0e0631af0305 40 //M*/
RyoheiHagimoto 0:0e0631af0305 41
RyoheiHagimoto 0:0e0631af0305 42 #ifndef OPENCV_IMGCODECS_H
RyoheiHagimoto 0:0e0631af0305 43 #define OPENCV_IMGCODECS_H
RyoheiHagimoto 0:0e0631af0305 44
RyoheiHagimoto 0:0e0631af0305 45 #include "opencv2/core/core_c.h"
RyoheiHagimoto 0:0e0631af0305 46
RyoheiHagimoto 0:0e0631af0305 47 #ifdef __cplusplus
RyoheiHagimoto 0:0e0631af0305 48 extern "C" {
RyoheiHagimoto 0:0e0631af0305 49 #endif /* __cplusplus */
RyoheiHagimoto 0:0e0631af0305 50
RyoheiHagimoto 0:0e0631af0305 51 /** @addtogroup imgcodecs_c
RyoheiHagimoto 0:0e0631af0305 52 @{
RyoheiHagimoto 0:0e0631af0305 53 */
RyoheiHagimoto 0:0e0631af0305 54
RyoheiHagimoto 0:0e0631af0305 55 enum
RyoheiHagimoto 0:0e0631af0305 56 {
RyoheiHagimoto 0:0e0631af0305 57 /* 8bit, color or not */
RyoheiHagimoto 0:0e0631af0305 58 CV_LOAD_IMAGE_UNCHANGED =-1,
RyoheiHagimoto 0:0e0631af0305 59 /* 8bit, gray */
RyoheiHagimoto 0:0e0631af0305 60 CV_LOAD_IMAGE_GRAYSCALE =0,
RyoheiHagimoto 0:0e0631af0305 61 /* ?, color */
RyoheiHagimoto 0:0e0631af0305 62 CV_LOAD_IMAGE_COLOR =1,
RyoheiHagimoto 0:0e0631af0305 63 /* any depth, ? */
RyoheiHagimoto 0:0e0631af0305 64 CV_LOAD_IMAGE_ANYDEPTH =2,
RyoheiHagimoto 0:0e0631af0305 65 /* ?, any color */
RyoheiHagimoto 0:0e0631af0305 66 CV_LOAD_IMAGE_ANYCOLOR =4,
RyoheiHagimoto 0:0e0631af0305 67 /* ?, no rotate */
RyoheiHagimoto 0:0e0631af0305 68 CV_LOAD_IMAGE_IGNORE_ORIENTATION =128
RyoheiHagimoto 0:0e0631af0305 69 };
RyoheiHagimoto 0:0e0631af0305 70
RyoheiHagimoto 0:0e0631af0305 71 /* load image from file
RyoheiHagimoto 0:0e0631af0305 72 iscolor can be a combination of above flags where CV_LOAD_IMAGE_UNCHANGED
RyoheiHagimoto 0:0e0631af0305 73 overrides the other flags
RyoheiHagimoto 0:0e0631af0305 74 using CV_LOAD_IMAGE_ANYCOLOR alone is equivalent to CV_LOAD_IMAGE_UNCHANGED
RyoheiHagimoto 0:0e0631af0305 75 unless CV_LOAD_IMAGE_ANYDEPTH is specified images are converted to 8bit
RyoheiHagimoto 0:0e0631af0305 76 */
RyoheiHagimoto 0:0e0631af0305 77 CVAPI(IplImage*) cvLoadImage( const char* filename, int iscolor CV_DEFAULT(CV_LOAD_IMAGE_COLOR));
RyoheiHagimoto 0:0e0631af0305 78 CVAPI(CvMat*) cvLoadImageM( const char* filename, int iscolor CV_DEFAULT(CV_LOAD_IMAGE_COLOR));
RyoheiHagimoto 0:0e0631af0305 79
RyoheiHagimoto 0:0e0631af0305 80 enum
RyoheiHagimoto 0:0e0631af0305 81 {
RyoheiHagimoto 0:0e0631af0305 82 CV_IMWRITE_JPEG_QUALITY =1,
RyoheiHagimoto 0:0e0631af0305 83 CV_IMWRITE_JPEG_PROGRESSIVE =2,
RyoheiHagimoto 0:0e0631af0305 84 CV_IMWRITE_JPEG_OPTIMIZE =3,
RyoheiHagimoto 0:0e0631af0305 85 CV_IMWRITE_JPEG_RST_INTERVAL =4,
RyoheiHagimoto 0:0e0631af0305 86 CV_IMWRITE_JPEG_LUMA_QUALITY =5,
RyoheiHagimoto 0:0e0631af0305 87 CV_IMWRITE_JPEG_CHROMA_QUALITY =6,
RyoheiHagimoto 0:0e0631af0305 88 CV_IMWRITE_PNG_COMPRESSION =16,
RyoheiHagimoto 0:0e0631af0305 89 CV_IMWRITE_PNG_STRATEGY =17,
RyoheiHagimoto 0:0e0631af0305 90 CV_IMWRITE_PNG_BILEVEL =18,
RyoheiHagimoto 0:0e0631af0305 91 CV_IMWRITE_PNG_STRATEGY_DEFAULT =0,
RyoheiHagimoto 0:0e0631af0305 92 CV_IMWRITE_PNG_STRATEGY_FILTERED =1,
RyoheiHagimoto 0:0e0631af0305 93 CV_IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY =2,
RyoheiHagimoto 0:0e0631af0305 94 CV_IMWRITE_PNG_STRATEGY_RLE =3,
RyoheiHagimoto 0:0e0631af0305 95 CV_IMWRITE_PNG_STRATEGY_FIXED =4,
RyoheiHagimoto 0:0e0631af0305 96 CV_IMWRITE_PXM_BINARY =32,
RyoheiHagimoto 0:0e0631af0305 97 CV_IMWRITE_WEBP_QUALITY =64,
RyoheiHagimoto 0:0e0631af0305 98 CV_IMWRITE_PAM_TUPLETYPE = 128,
RyoheiHagimoto 0:0e0631af0305 99 CV_IMWRITE_PAM_FORMAT_NULL = 0,
RyoheiHagimoto 0:0e0631af0305 100 CV_IMWRITE_PAM_FORMAT_BLACKANDWHITE = 1,
RyoheiHagimoto 0:0e0631af0305 101 CV_IMWRITE_PAM_FORMAT_GRAYSCALE = 2,
RyoheiHagimoto 0:0e0631af0305 102 CV_IMWRITE_PAM_FORMAT_GRAYSCALE_ALPHA = 3,
RyoheiHagimoto 0:0e0631af0305 103 CV_IMWRITE_PAM_FORMAT_RGB = 4,
RyoheiHagimoto 0:0e0631af0305 104 CV_IMWRITE_PAM_FORMAT_RGB_ALPHA = 5,
RyoheiHagimoto 0:0e0631af0305 105 };
RyoheiHagimoto 0:0e0631af0305 106
RyoheiHagimoto 0:0e0631af0305 107
RyoheiHagimoto 0:0e0631af0305 108
RyoheiHagimoto 0:0e0631af0305 109 /* save image to file */
RyoheiHagimoto 0:0e0631af0305 110 CVAPI(int) cvSaveImage( const char* filename, const CvArr* image,
RyoheiHagimoto 0:0e0631af0305 111 const int* params CV_DEFAULT(0) );
RyoheiHagimoto 0:0e0631af0305 112
RyoheiHagimoto 0:0e0631af0305 113 /* decode image stored in the buffer */
RyoheiHagimoto 0:0e0631af0305 114 CVAPI(IplImage*) cvDecodeImage( const CvMat* buf, int iscolor CV_DEFAULT(CV_LOAD_IMAGE_COLOR));
RyoheiHagimoto 0:0e0631af0305 115 CVAPI(CvMat*) cvDecodeImageM( const CvMat* buf, int iscolor CV_DEFAULT(CV_LOAD_IMAGE_COLOR));
RyoheiHagimoto 0:0e0631af0305 116
RyoheiHagimoto 0:0e0631af0305 117 /* encode image and store the result as a byte vector (single-row 8uC1 matrix) */
RyoheiHagimoto 0:0e0631af0305 118 CVAPI(CvMat*) cvEncodeImage( const char* ext, const CvArr* image,
RyoheiHagimoto 0:0e0631af0305 119 const int* params CV_DEFAULT(0) );
RyoheiHagimoto 0:0e0631af0305 120
RyoheiHagimoto 0:0e0631af0305 121 enum
RyoheiHagimoto 0:0e0631af0305 122 {
RyoheiHagimoto 0:0e0631af0305 123 CV_CVTIMG_FLIP =1,
RyoheiHagimoto 0:0e0631af0305 124 CV_CVTIMG_SWAP_RB =2
RyoheiHagimoto 0:0e0631af0305 125 };
RyoheiHagimoto 0:0e0631af0305 126
RyoheiHagimoto 0:0e0631af0305 127 /* utility function: convert one image to another with optional vertical flip */
RyoheiHagimoto 0:0e0631af0305 128 CVAPI(void) cvConvertImage( const CvArr* src, CvArr* dst, int flags CV_DEFAULT(0));
RyoheiHagimoto 0:0e0631af0305 129
RyoheiHagimoto 0:0e0631af0305 130 CVAPI(int) cvHaveImageReader(const char* filename);
RyoheiHagimoto 0:0e0631af0305 131 CVAPI(int) cvHaveImageWriter(const char* filename);
RyoheiHagimoto 0:0e0631af0305 132
RyoheiHagimoto 0:0e0631af0305 133
RyoheiHagimoto 0:0e0631af0305 134 /****************************************************************************************\
RyoheiHagimoto 0:0e0631af0305 135 * Obsolete functions/synonyms *
RyoheiHagimoto 0:0e0631af0305 136 \****************************************************************************************/
RyoheiHagimoto 0:0e0631af0305 137
RyoheiHagimoto 0:0e0631af0305 138 #define cvvLoadImage(name) cvLoadImage((name),1)
RyoheiHagimoto 0:0e0631af0305 139 #define cvvSaveImage cvSaveImage
RyoheiHagimoto 0:0e0631af0305 140 #define cvvConvertImage cvConvertImage
RyoheiHagimoto 0:0e0631af0305 141
RyoheiHagimoto 0:0e0631af0305 142 /** @} imgcodecs_c */
RyoheiHagimoto 0:0e0631af0305 143
RyoheiHagimoto 0:0e0631af0305 144 #ifdef __cplusplus
RyoheiHagimoto 0:0e0631af0305 145 }
RyoheiHagimoto 0:0e0631af0305 146 #endif
RyoheiHagimoto 0:0e0631af0305 147
RyoheiHagimoto 0:0e0631af0305 148 #endif // OPENCV_IMGCODECS_H