摘要:
#include <windows.h> // Windows的头文件#include <gl\gl.h> // OpenGL32库的头文件#include <gl\glu.h> // GLu32库的头文件#include <gl\glaux.h> // GLaux库的头文件#include <gl\glut.h> // Glut库头文件#include <math.h>#pragma comment( lib, "opengl32.lib") // OpenGL32连接库#pragma comment 阅读全文
摘要:
#include <windows.h> // Windows的头文件#include <gl\gl.h> // OpenGL32库的头文件#include <gl\glu.h> // GLu32库的头文件#include <gl\glaux.h> // GLaux库的头文件#include <gl\glut.h> // Glut库头文件#pragma comment( lib, "opengl32.lib") // OpenGL32连接库#pragma comment( lib, "glu32.lib& 阅读全文
摘要:
lianDlg.cpp#include "lmain.h"void ClianDlg::OnBnClickedButton1(){ // TODO: 在此添加控件通知处理程序代码 CWinThread *m_edit; m_edit=AfxBeginThread(lmain,&(m_hWnd),THREAD_PRIORITY_NORMAL,0,CREATE_SUSPENDED,NULL); m_edit->m_bAutoDelete=TRUE; m_edit->ResumeThread();}lmain.hUINT lmain(LPVOID lpPara 阅读全文
摘要:
#include <stdio.h>typedef void (* FP)(unsigned int a,unsigned int b);//void DataDeal(FP PCB);//void PointerReceive(unsigned int a,unsigned int b);//void Pointer(unsigned int a,unsigned int b);////////////////////////////////////////////////////////////////void Pointer(unsigned int a,unsigned i 阅读全文
摘要:
cl;img=imread('3.17.tif');imgn=imnoise(img,'salt & pepper',0.02);[m n]=size(img);%h=fspecial('average',[3 3]); % 3*3的均值滤波%imgn1=imfilter(imgn,h,'replicate');%imgn=medfilt2(imgn,[3 3]); % 3*3的中值滤波%%%%自己编写3*3均值滤波%{tem=0;for i=2:1:m-1 for j=2:1:n-1 for p=i-1:1:i+1 .. 阅读全文
摘要:
cl;img=imread('15.bmp');%img=double(img);f=fft2(img); %傅里叶变换f=fftshift(f); %使图像对称r=real(f); %图像频域实部i=imag(f); %图像频域虚部margin=log(abs(f)); %图像幅度谱,加log便于显示phase=log(angle(f)*180/pi); %图像相位谱l=log(f); subplot(2,2,1),imshow(img),title('源图像');%subplot(2,2,2)... 阅读全文
摘要:
cl;img=imread('15.bmp');%imshow(img);[m n]=size(img);max=0;min=256;avg=0;for i=1:1:m for j=1:1:n if img(i,j)<min min=img(i,j); end if img(i,j)>max max=img(i,j); end avg=avg+double(img(i,j)); endend%avg=mean(mean(img));avg=uint8(avg/(m*n)... 阅读全文
摘要:
#include <iostream>using namespace std;int main(){ double a[] ={2,2,2, 3,2,4, 1,3,9}; double b[] = {1,0.5,2.5}; double m =0; int n=3; for (int i = 0; i < n-1; i++) { for (int j = i + 1; j < n; j++) { m = a[j*n+i] / a[i*n+i]; ... 阅读全文
摘要:
bool isNumber(char s){ if (s >= 48 && s <= 57) return true; else return false;}bool isLetter(char s){ if (s >= 97 && s <= 122) return true; else return false;}//函数的作用是把如“-45+2*a-a^2-4*a^6+a^8”这样的字符串提取成这样:(-45,2,-1,0,0,0,-4,0,1),只提取系数,并根据指数安排起位置.//s为传入的字符串,resu... 阅读全文
摘要:
#include <iostream>using namespace std;void malo(double **p){ *p =new double; double *w=new double[10]; for (int i=0;i<10;i++) { w[i]=2*i; } *p=w;}void main(){ double *m=NULL; malo(&m); for (int i=0;i<10;i++) { cout<<m[i]<<""; } delete[] m; syst... 阅读全文