gvideo.h

来自「一个由Mike Gashler完成的机器学习方面的includes neural」· C头文件 代码 · 共 60 行

H
60
字号
/*	Copyright (C) 2006, Mike Gashler	This library is free software; you can redistribute it and/or	modify it under the terms of the GNU Lesser General Public	License as published by the Free Software Foundation; either	version 2.1 of the License, or (at your option) any later version.	see http://www.gnu.org/copyleft/lesser.html*/#ifndef __GVIDEO_H__#define __GVIDEO_H__class GPointerArray;class GImage;class GVideo{protected:	GPointerArray* m_pFrames;	int m_nWidth, m_nHeight;public:	// nWidth and nHeight specify the size of each frame in the video.	// (The video is initialized to contain no frames.)	GVideo(int nWidth, int nHeight);	~GVideo();	// Deletes all the frames and sets the size for future frames	void SetSize(int width, int height);	// Returns the width of each frame in the video	int GetWidth() const { return m_nWidth; }	// Returns the height of each frame in the video	int GetHeight() const { return m_nHeight; }	// Returns the number of frames	int GetFrameCount();	// Returns the specified frame	GImage* GetFrame(int index);	// Appends a blank frame to the end of the video	void AddBlankFrame();	// Loads a PNG file and appends it as a frame to the video. The dimensions	// of the PNG file must match the dimensions of the video frames.	bool LoadFrame(const char* szFilename);	// Makes this video into a gradient magnitude video. If bForDisplay is true,	// it will put the magnitude in each channel so that the resultant video	// will make visual sense.	void MakeGradientMagnitudeVideo(GVideo* pVideo, bool bForDisplay);};#endif // __GVIDEO_H__

⌨️ 快捷键说明

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