


下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、-作者xxxx-日期xxxxsift算法的MATLAB程序【精品文檔】% image, descriptors, locs = sift(imageFile)% This function reads an image and returns its SIFT keypoints.% Input parameters:% imageFile: the file name for the image.% Returned:% image: the image array in double format% descriptors: a K-by-128 matrix, where each ro
2、w gives an invariant% descriptor for one of the K keypoints. The descriptor is a vector% of 128 values normalized to unit length.% locs: K-by-4 matrix, in which each row has the 4 values for a% keypoint location (row, column, scale, orientation). The % orientation is in the range -PI, PI radians.% C
3、redits: Thanks for initial version of this program to D. Alvaro and % J.J. Guerrero, Universidad de Zaragoza (modified by D. Lowe) function image, descriptors, locs = sift(imageFile) % Load imageimage = imread(imageFile); % If you have the Image Processing Toolbox, you can uncomment the following% l
4、ines to allow input of color images, which will be converted to grayscale.% if isrgb(image)% image = rgb2gray(image);% end rows, cols = size(image); % Convert into PGM imagefile, readable by keypoints executablef = fopen(, w);if f = -1 error(Could not create file .);endfprintf(f, P5n%dn%dn255n, cols
5、, rows);fwrite(f, image, uint8);fclose(f); % Call keypoints executableif isunix command = !./sift ;else command = !siftWin32 ;endcommand = command ;eval(command); % Open and check its headerg = fopen(, r);if g = -1 error(Could not open file .);endheader, count = fscanf(g, %d %d, 1 2);if count = 2 er
6、ror(Invalid keypoint file beginning.);endnum = header(1);len = header(2);if len = 128 error(Keypoint descriptor length invalid (should be 128).);end % Creates the two output matrices (use known size for efficiency)locs = double(zeros(num, 4);descriptors = double(zeros(num, 128); % Parse for i = 1:num vector, count = fscanf(g, %f %f %f %f, 1 4); %row col scale ori if count = 4 error(Invalid keypoint file format); end locs(i, :) = vector(1, :); descrip, count = fscanf(g, %d, 1 len); if (count = 128) error(Invalid keypoint file value.); end % Normalize each input vector
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 【正版授權(quán)】 ISO 7436:2024 EN Fasteners - Slotted set screws with cup point
- 2025年度二手房買賣交易合同(附帶房屋抵押權(quán)解除及貸款還款計(jì)劃)
- 2025年度新能源項(xiàng)目安全生產(chǎn)責(zé)任書匯編
- 2025年度科技創(chuàng)新項(xiàng)目資金擔(dān)保合同
- 2025年高科技車間承包服務(wù)協(xié)議
- 2025年度社區(qū)配套車位代理銷售服務(wù)合同
- 傳統(tǒng)藝術(shù)與現(xiàn)代美術(shù)課程融合計(jì)劃
- 如何進(jìn)行有效的課堂觀察計(jì)劃
- 提升自我管理能力的策略計(jì)劃
- 關(guān)注員工個(gè)人發(fā)展的措施計(jì)劃
- 班級(jí)管理(課件).ppt
- 秋裝校服供貨售后保障方案
- 惡性腫瘤化療后重度骨髓抑制病人的護(hù)理論文
- cmu200_中文使用詳細(xì)說明
- 英語(yǔ)句子成分結(jié)構(gòu)講解
- 注塑參數(shù)DOE分析范例
- 綜合布線類項(xiàng)目施工圖解(共21頁(yè))
- 圓錐曲線方程復(fù)習(xí)
- 《地質(zhì)災(zāi)害防治知識(shí)》PPT課件.ppt
- 招生代理合作協(xié)議書
- (完整版)初中地理課程標(biāo)準(zhǔn)-人教版
評(píng)論
0/150
提交評(píng)論