⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 project.cpp

📁 the code environment s C++. it is in image processing field. this code Read TIFF Image then it excut
💻 CPP
字号:
#define BYTE unsigned  char
#include<iostream.h>
#include<io.h>
#include <ctype.h> 
#include<stdio.h>
#include<stdlib.h>
#include<io.h>
#include "Filter.h"
#include "Image.h"

void main()
{

CFilter FilterVar;  // declaration of filter 
CImage  ImageVar;   // declaration of image
long m_lWidth=0;       
long m_lHeight=0;            
int i=0;
//------ Load the dimension of the image -------//                    
ImageVar.LoadDimensionOfImage(m_lWidth, m_lHeight);

cout<<" main ok1 :m_lWidth ="<<m_lWidth<<endl;
cout<<" main ok1 :m_lHeight="<<m_lHeight<<endl;
int NBL= m_lHeight;
int NBC=m_lWidth;


float *InputImage=NULL;
InputImage= new float[NBL*NBC];
//------- Load the value of each pixel---------//
ImageVar.ReadTIFFImage(m_lWidth, m_lHeight, InputImage);

float *OutputImage=NULL;
OutputImage= new float[NBL*NBC];

 
FilterVar.MedianFilterClassical(InputImage, OutputImage, NBL, NBC);
InputImage=NULL;
delete [] InputImage;

ImageVar.WriteTIFFUnsignedChar(m_lWidth, m_lHeight, OutputImage);
OutputImage=NULL;
delete [] OutputImage;

}
 

⌨️ 快捷键说明

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