필터 지우기
필터 지우기

detectSIFTFeatures only working for uint8

조회 수: 3 (최근 30일)
Michael Jones
Michael Jones 2024년 3월 19일
댓글: Michael Jones 2024년 3월 19일
I = imread('cameraman.tif');
points = detectSIFTFeatures(I);
Gives me heaps of points as expected
I = imread('cameraman.tif');
points = detectSIFTFeatures(double(I));
gives no points. The same zero points retured for anything other than uint8, for every image I've tried. The same behaviour is true for SURF points.
Does anyone have any suggestions?

채택된 답변

Udit06
Udit06 2024년 3월 19일
Hi Michael,
If you want to use an image of double data type as input, you should first scale it down to the range [0, 1]. Doing so will give you the similar results that you are getting with uint8 data type. Here is the code for the same.
I = imread('cameraman.tif');
points1 = detectSIFTFeatures(I)
points1 =
274×1 SIFTPoints array with properties: Scale: [274×1 single] Orientation: [274×1 single] Octave: [274×1 int32] Layer: [274×1 int32] Location: [274×2 single] Metric: [274×1 single] Count: 274
I = imread('cameraman.tif');
points2 = detectSIFTFeatures(double(I)/255)
points2 =
274×1 SIFTPoints array with properties: Scale: [274×1 single] Orientation: [274×1 single] Octave: [274×1 int32] Layer: [274×1 int32] Location: [274×2 single] Metric: [274×1 single] Count: 274
You can refer to the following note of the MathWorks documentation for the same.
I hope this helps.

추가 답변 (1개)

Qu Cao
Qu Cao 2024년 3월 19일
I = imread('cameraman.tif');
points = detectSIFTFeatures(im2double(I))
points =
274x1 SIFTPoints array with properties: Scale: [274x1 single] Orientation: [274x1 single] Octave: [274x1 int32] Layer: [274x1 int32] Location: [274x2 single] Metric: [274x1 single] Count: 274

카테고리

Help CenterFile Exchange에서 Feature Detection and Extraction에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by