📄 testimage.h
字号:
// TestImage.h
/*
** Copyright (C) 2000 Tyler C. Folsom
**
** Permission to use, copy, modify, and distribute this software and its
** documentation for any purpose and without fee is hereby granted, provided
** that the above copyright notice appear in all copies and that both that
** copyright notice and this permission notice appear in supporting
** documentation. This software is provided "as is" without express or
** implied warranty.
*/
#ifndef TESTIMAGE_H
#define TESTIMAGE_H
#ifndef __VIS_INC_DISPLAY_H__
#include "VisDisplay.h"
#endif
class CTestImage : public CVisByteImage
{
public:
CTestImage( int width, int height) : CVisByteImage( width, height )
{}
void MakeEdge( int contrast );
void MakeBar( int contrast, int barWidth);
void MakeCorner( int contrast );
void Rotate(int degrees);
void AddNoise( float sigma);
private:
float normal_rv (float mean, float sigma);
void Warp
( CTestImage& newImage,
double rot = 0.0, // Rotation (degrees)
double h1 = 0, double h2 = 0, // Translation (pixels from image center)
double scale = 1.0, // scale factor: new height / old height
double tilt_ax = 0.0, // Tilt axis (degrees)
double tilt = 0.0 // Tilt angle (degrees)
);
void angles_matrix
( double scale, double rotat, double tilt_axis,
double tilt_angle, double *matrix);
void invert( double *matrix, double *inverse);
void CTestImage::warp_it( CTestImage& newImage, double matrix[4], double h1,
double h2);
};
#endif // TESTIMAGE_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -