imagefile.h

来自「一个语言识别引擎」· C头文件 代码 · 共 52 行

H
52
字号
// -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-

/*
 * Copyright (C) 2006 Lorenzo Natale
 * CopyPolicy: Released under the terms of the GNU GPL v2.0.
 *
 */

//
// $Id: ImageFile.h,v 1.10 2006/10/24 19:51:03 eshuy Exp $
//
//

// paulfitz Wed May 30 18:35:14 EDT 2001
// pasa: June 2002, don't exit on open failure (gracefully returns -1, 0 if OK).// nat: May 06, adapted for YARP2

#ifndef YARP2ImageFile_INC
#define YARP2ImageFile_INC

#include <yarp/sig/Image.h>

namespace yarp {
    namespace sig{
        /**
         * \ingroup sig_class
         *
         * Image file operations.
         */
        namespace file {
            enum
                {
                    FORMAT_NULL,
                    FORMAT_ANY,
                    FORMAT_PGM,
                    FORMAT_PPM,
                    FORMAT_NUMERIC,
                };
            bool read(ImageOf<PixelRgb>& dest, const char *src);
            bool read(ImageOf<PixelBgr>& dest, const char *src);
            bool read(ImageOf<PixelMono>& dest, const char *src);
            //bool read(FlexImage& dest, const char *src);

            bool write(const ImageOf<PixelRgb>& src, const char *dest);
            bool write(const ImageOf<PixelBgr>& src, const char *dest);
            bool write(const ImageOf<PixelMono>& src, const char *dest);
            bool write(const Image& src, const char *dest);
        }
    }
};

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?