-
Notifications
You must be signed in to change notification settings - Fork 0
/
Test.py
29 lines (25 loc) · 931 Bytes
/
Test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import os
from imageio import imread
import matplotlib.pyplot as plt
from Feature import detectFeaturepoints
def testDetectFeaturepoints():
imageArray = imread(os.path.dirname(__file__)+'/img/ruin.JPG', as_gray=True)
resolutionMax = 1
scalerangeFactor = 3
scalesCount = 8
hessianThreshold = 0.03
minFeatureScales = 3
featurepoints = detectFeaturepoints(
imageArray,
resolutionMax,
scalerangeFactor,
scalesCount,
hessianThreshold,
minFeatureScales)
featurepointsX = [f.x for f in featurepoints]
featurepointsY = [f.y for f in featurepoints]
plt.imshow(imageArray, cmap = plt.get_cmap('gray'))
plt.scatter(featurepointsX,featurepointsY,s=1,c="red")
plt.savefig("ruinFeatures.jpg")
if __name__ == "__main__":
testDetectFeaturepoints()