導航:首頁 > 五金知識 > 使用vlfeat工具箱提取特徵點

使用vlfeat工具箱提取特徵點

發布時間:2021-02-14 03:08:53

① SIFT演算法提取特徵點,怎樣得到正確的特徵點空間坐標,網上實現的程序里loc(i,1),loc(i,2)說是特徵點的坐標

為了更加准確,大衛勞氏推薦用了subpixel也就是子像素坐標,
但是這里的話你直接取整形就是了。
有warning能通了不就行了?

② 如何調用vlfeat工具箱中的的vl

將vlfeat安裝來好之後,將其添加進matlab的set path中,自直接調用即可,img=imread('img.jpg');img1=rgb2gray(img);img2=im2single(img1);f=vl_sift(img2)
這里f是一個[x,y,s,th]的向量矩陣,x,y表示興趣點的中心位置,s表示興趣點的尺度大小,th是其梯度方向。
其他還有諸如[f,d]=vl_sift(img2)的調用方式,其中d表示128維的特徵向量,具體看help vl_sift,上面說的很詳細。

③ vlfeat中的sift特徵提取能用openmp並行實現么

vlfeat中的sift特徵提取能用openmp並行實現
將vlfeat安裝好之後,將其添加進matlab的set path中,直接調用即可版,img=imread('img.jpg');img1=rgb2gray(img);img2=im2single(img1);f=vl_sift(img2)
這里權f是一個[x,y,s,th]的向量矩陣,x,y表示興趣點的中心位置,s表示興趣點的尺度大小,th是其梯度方向。
其他還有諸如[f,d]=vl_sift(img2)的調用方式,其中d表示128維的特徵向量,具體看help vl_sift,上面說的很詳細。

④ MATLAB編程實現特徵點提取

是試用一下find函數

⑤ matlab opencv 特徵點提取與匹配問題

你先找找看,如果找不到,可以試著每次只對1/4圖像提取特徵點,然後把四部分特徵點集合在一起匹配,這樣可以做到盡量均勻

⑥ 如何用OPENCV編程提取特徵點,要符合visualSFM的格式

整個項目的結構圖:

編寫DetectFaceDemo.java,代碼如下:

[java] view
plainprint?

package com.njupt.zhb.test;

import org.opencv.core.Core;

import org.opencv.core.Mat;

import org.opencv.core.MatOfRect;

import org.opencv.core.Point;

import org.opencv.core.Rect;

import org.opencv.core.Scalar;

import org.opencv.highgui.Highgui;

import org.opencv.objdetect.CascadeClassifier;

//

// Detects faces in an image, draws boxes around them, and writes the results

// to "faceDetection.png".

//

public class DetectFaceDemo {

public void run() {

System.out.println("\nRunning DetectFaceDemo");

System.out.println(getClass().getResource("lbpcascade_frontalface.xml").getPath());

// Create a face detector from the cascade file in the resources

// directory.

//CascadeClassifier faceDetector = new CascadeClassifier(getClass().getResource("lbpcascade_frontalface.xml").getPath());

//Mat image = Highgui.imread(getClass().getResource("lena.png").getPath());

//注意:源程序的路徑會多列印一個『/』,因此總是出現如下錯誤

/*

* Detected 0 faces Writing faceDetection.png libpng warning: Image

* width is zero in IHDR libpng warning: Image height is zero in IHDR

* libpng error: Invalid IHDR data

*/

//因此,我們將第一個字元去掉

String xmlfilePath=getClass().getResource("lbpcascade_frontalface.xml").getPath().substring(1);

CascadeClassifier faceDetector = new CascadeClassifier(xmlfilePath);

Mat image = Highgui.imread(getClass().getResource("we.jpg").getPath().substring(1));

// Detect faces in the image.

// MatOfRect is a special container class for Rect.

MatOfRect faceDetections = new MatOfRect();

faceDetector.detectMultiScale(image, faceDetections);

System.out.println(String.format("Detected %s faces", faceDetections.toArray().length));

// Draw a bounding box around each face.

for (Rect rect : faceDetections.toArray()) {

Core.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height), new Scalar(0, 255, 0));

}

// Save the visualized detection.

String filename = "faceDetection.png";

System.out.println(String.format("Writing %s", filename));

Highgui.imwrite(filename, image);

}

}
package com.njupt.zhb.test;
import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.core.MatOfRect;
import org.opencv.core.Point;
import org.opencv.core.Rect;
import org.opencv.core.Scalar;
import org.opencv.highgui.Highgui;
import org.opencv.objdetect.CascadeClassifier;

//
// Detects faces in an image, draws boxes around them, and writes the results
// to "faceDetection.png".
//
public class DetectFaceDemo {
public void run() {
System.out.println("\nRunning DetectFaceDemo");
System.out.println(getClass().getResource("lbpcascade_frontalface.xml").getPath());
// Create a face detector from the cascade file in the resources
// directory.
//CascadeClassifier faceDetector = new CascadeClassifier(getClass().getResource("lbpcascade_frontalface.xml").getPath());
//Mat image = Highgui.imread(getClass().getResource("lena.png").getPath());
//注意:源程序的路徑會多列印一個『/』,因此總是出現如下錯誤
/*
* Detected 0 faces Writing faceDetection.png libpng warning: Image
* width is zero in IHDR libpng warning: Image height is zero in IHDR
* libpng error: Invalid IHDR data
*/
//因此,我們將第一個字元去掉
String xmlfilePath=getClass().getResource("lbpcascade_frontalface.xml").getPath().substring(1);
CascadeClassifier faceDetector = new CascadeClassifier(xmlfilePath);
Mat image = Highgui.imread(getClass().getResource("we.jpg").getPath().substring(1));
// Detect faces in the image.
// MatOfRect is a special container class for Rect.
MatOfRect faceDetections = new MatOfRect();
faceDetector.detectMultiScale(image, faceDetections);

System.out.println(String.format("Detected %s faces", faceDetections.toArray().length));

// Draw a bounding box around each face.
for (Rect rect : faceDetections.toArray()) {
Core.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height), new Scalar(0, 255, 0));
}

// Save the visualized detection.
String filename = "faceDetection.png";
System.out.println(String.format("Writing %s", filename));
Highgui.imwrite(filename, image);
}
}

3.編寫測試類:

[java] view
plainprint?

package com.njupt.zhb.test;

public class TestMain {

public static void main(String[] args) {

System.out.println("Hello, OpenCV");

// Load the native library.

System.loadLibrary("opencv_java246");

new DetectFaceDemo().run();

}

}

//運行結果:

//Hello, OpenCV

//

//Running DetectFaceDemo

///E:/eclipse_Jee/workspace/JavaOpenCV246/bin/com/njupt/zhb/test/lbpcascade_frontalface.xml

//Detected 8 faces

//Writing faceDetection.png
package com.njupt.zhb.test;
public class TestMain {
public static void main(String[] args) {
System.out.println("Hello, OpenCV");
// Load the native library.
System.loadLibrary("opencv_java246");
new DetectFaceDemo().run();
}
}
//運行結果:
//Hello, OpenCV
//
//Running DetectFaceDemo
///E:/eclipse_Jee/workspace/JavaOpenCV246/bin/com/njupt/zhb/test/lbpcascade_frontalface.xml
//Detected 8 faces
//Writing faceDetection.png

⑦ matlab 中有自動提取圖像特徵點的函數嗎

n

⑧ 如何調用工具箱中的vlfeat的vl

將vlfeat安裝好之後,將其添加進matlab的set path中,直接調用即可,img=imread('img.jpg');img1=rgb2gray(img);img2=im2single(img1);f=vl_sift(img2)
這里f是一個[x,y,s,th]的向量矩陣,x,y表示興趣點內的中容心位置,s表示興趣點的尺度大小,th是其梯度方向。
其他還有諸如[f,d]=vl_sift(img2)的調用方式,其中d表示128維的特徵向量,具體看help vl_sift,上面說的很詳細。

⑨ 在MATLAB中,進行特徵點提取並用紅色的點進行標記,怎麼計算標記點的個數

特徵點提取不是自己寫的代碼嗎?幹嘛非計算標記的紅點個數,代碼內自己設立一個變數計數就行了

閱讀全文

與使用vlfeat工具箱提取特徵點相關的資料

熱點內容
海龍工具箱正版多少錢 瀏覽:694
名盾機械手錶價格多少 瀏覽:802
傳動裝置是連接 瀏覽:878
壓力檢測自啟裝置 瀏覽:295
畫法幾何及機械制圖用什麼軟體 瀏覽:204
2021寶來儀表盤怎麼看 瀏覽:948
輝縣市有哪些重工機械 瀏覽:257
先進控制精餾塔實驗裝置 瀏覽:361
dnf機械小78是什麼技能 瀏覽:529
空軍氣象兵的工作設備是什麼 瀏覽:915
潮洲美怡五金製品有限公司怎麼樣 瀏覽:303
w10怎麼查看設備 瀏覽:235
滾動軸承如何預防預緊 瀏覽:732
安徽隧道工程專用型實驗裝置采購 瀏覽:477
井下移變硐室需要哪些滅火器材 瀏覽:355
自動門底密封裝置 瀏覽:896
C級軸承對應是P級是多少 瀏覽:750
如何繪制實驗裝置圖 瀏覽:78
大眾探歌儀表盤如何顯示日期 瀏覽:338
藍色供水管道閥門 瀏覽:779