Kinect SDK提取彩色像素

#include <iostream>using namespace std;#include <Windows.h>#include "MSR_NuiApi.h"//#include "highgui.h"int main(int argc,char **argv){// IplImage *img;// CvScalar s;// img=cvCreateImage(cvSize(640,480),IPL_DEPTH_8U,3);

STL練習程式(去除相同元素)

#include <iostream>#include <vector>#include <algorithm>using namespace std;int testscore[] = {67, 56, 24, 78, 99, 87, 56}; void main(){ vector<int> score(testscore,testscore+sizeof(testscore)/sizeof(int));

STL練習程式(String…)

#include <string>#include <iostream>#include <algorithm>#include <vector>#include <fstream>using namespace std;int main(){ ifstream in("data.txt");string strtmp; vector<string> vect;while (getline(in,strtmp,'

OpenGL繪製三角形、正方形

int DrawGLScene(GLvoid) // 從這裡開始進行所有的繪製{ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // 清除螢幕和深度緩衝 glLoadIdentity(); // 重設當前的模型觀察矩陣 glTranslatef(-1.5f,0.0f,-6.0f);

不重複隨機序列

#include <iostream>#include <time.h>#include <stdlib.h>using namespace std;int random(int a,int b){ srand(NULL);return rand()%(b-a)+a;}void exchange(int &a,int &b){int temp; temp=a; a=b; b=temp;}int main(){int a[

matlab練習程式(灰階、二值映像腐蝕膨脹)

cl;img_gray=imread('fupeng.jpg');img_erzhi=imread('erzhi_fupeng.jpg');imshow(img_gray)figure,imshow(img_erzhi)[m n]=size(img_gray);img_gray_fu=zeros(m,n);img_gray_peng=zeros(m,n);img_erzhi_fu=zeros(m,n);img_erzhi_peng=zeros(m,n);for i=2:m-1for j=2:n-

matlab練習程式(映像傅裡葉變換,幅度譜,相位譜)

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);

最小化托盤程式

trayDlg.h:afx_msg LRESULT onShowTask(WPARAM wParam,LPARAM lParam);void Tdehide();void dehide();trayDlg.cpp:#define WM_SHOWTASK WM_USERBEGIN_MESSAGE_MAP(CtrayDlg, CDialogEx) ON_MESSAGE(WM_SHOWTASK,onShowTask)END_MESSAGE_MAP()void

487-3279(1002)

#pragma warning (disable:4786)#include <iostream>#include <map>#include <algorithm>#include <string>#include <vector>using namespace std;typedef struct {string first;int second;}res;bool less_first(res tmp1,res

matlab練習程式(彩虹編碼偽彩色化)

cl;img=imread('fupeng.jpg');z=3;[x y]=size(img);imshow(img);img=double(img);img_cai=zeros(x,y,z);Max=max(max(img));Min=min(min(img));img=(255/(Max-Min))*img-(255*Min)/(Max-Min);figure,imshow(uint8(img));r=1;g=2;b=3;for i=1:xfor j=1:y

matlab練習程式(makelut/applylut)

cl;bw=[eye(3) eye(3);eye(3) eye(3)]; %要處理的矩陣f=eye(3); %模板矩陣,其實是需要使用到的邏輯lut=makelut(@(nbood) isequal(nbood,f),3); %產生查表向量,將f矩陣這樣的邏輯應用程式到3*3的nbood上bw1=applylut(bw,lut);

隨機化快速排序

#include <iostream>#include <time.h>#include <stdlib.h>using namespace std;int random(int a,int b){ srand(NULL);return rand()%(b-a)+a;}void exchange(int &a,int &b){int temp; temp=a; a=b; b=temp;}int

Win32 SDK(對話方塊程式)

#include <Windows.h>#include <tchar.h>#include "resource.h"TCHAR DlgName[]=TEXT("MyDialog");TCHAR AppName[]=TEXT("Dialog");;//TCHAR TestString[]=TEXT("hello world");TCHAR buffer1[512];TCHAR buffer2[512];TCHAR *buffer3=NULL;int a=0,b=0,c=0

一組區間中交集最多的一個

#include <iostream>#include <stdlib.h>#include <time.h>using namespace std;#define NUM 30 //區間個數typedef struct {int min; //區間中最小值 int max; //區間中最大值 int diff;

vc新線程、類外控制EDIT控制項

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;

刪除字串中指定字元

#include <string.h>#include <vector>#include <algorithm>#include <string>#include <iostream>using namespace std;void main(){string m("----------asdfas--------------dfgdf---------");string::iterator it; vector<char&

OpenGL繪製架構

#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,

OpenGL3D圖形繪製

GLfloat xtri; GLfloat ytri;GLfloat ztri;int DrawGLScene(GLvoid) // 從這裡開始進行所有的繪製{ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // 清除螢幕及深度緩衝 glLoadIdentity();

OpenGL繪製函數

#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

matlab練習程式(映像加噪,各種濾波)

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

總頁數: 61357 1 .... 9038 9039 9040 9041 9042 .... 61357 Go to: 前往

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.