日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 人工智能 > 循环神经网络 >内容正文

循环神经网络

用matlab实现sift算法,sift算法的MATLAB程序

發(fā)布時(shí)間:2023/12/20 循环神经网络 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 用matlab实现sift算法,sift算法的MATLAB程序 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

《sift算法的MATLAB程序》由會(huì)員分享,可在線閱讀,更多相關(guān)《sift算法的MATLAB程序(2頁(yè)珍藏版)》請(qǐng)?jiān)谌巳宋膸?kù)網(wǎng)上搜索。

1、 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 row gives an invariant%descriptor for 。

2、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.% Credits: Thanks for initial version of thi。

3、s 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% lines to allow input of color images, which wil。

4、l be converted to grayscale.% if isrgb(image)% image = rgb2gray(image);% endrows, cols = size(image);% Convert into PGM imagefile, readable by keypoints executablef = fopen( tmp.pgm , w );if f = -1error(Could not create file tmp.pgm.);endfprintf(f, P5n%dn%dn255n , cols, rows);fwrite(f, image, uint8 。

5、);fclose(f);% Call keypoints executableif isunixcommand = !./sift ;elsecommand = !siftWin32 ;endcommand = command tmp.key ;eval(command);% Open tmp.key and check its headerg = fopen( tmp.key , r );if g = -1error( Could not open file tmp.key. ); endheader, count = fscanf(g, %d %d , 1 2);if count = 2e。

6、rror( Invalid keypoint file beginning. ); endnum = header(1);len = header(2);if len = 128);%row col scale orierror( 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。

7、);% Parse tmp.keyfor i = 1:numvector, count = fscanf(g, %f %f %f %f , 1 4); if count = 4error( Invalid keypoint file format ); endlocs(i, :) = vector(1, :);descrip, count = fscanf(g, %d , 1 len); if (count = 128)error( Invalid keypoint file value. ); end% Normalize each input vector to unit length descrip = descrip / sqrt(sum(descrip.A2); descriptors(i, :) = descrip(1, :);end fclose(g。

總結(jié)

以上是生活随笔為你收集整理的用matlab实现sift算法,sift算法的MATLAB程序的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。