MCPcopy Create free account
hub / github.com/PyImageSearch/imutils / detect

Method detect

imutils/feature/dense.py:8–20  ·  view source on GitHub ↗
(self, img)

Source from the content-addressed store, hash-verified

6 self.radius = radius
7
8 def detect(self, img):
9 # initialize our list of keypoints
10 kps = []
11
12 # loop over the height and with of the image, taking a `step`
13 # in each direction
14 for x in range(0, img.shape[1], self.step):
15 for y in range(0, img.shape[0], self.step):
16 # create a keypoint and add it to the keypoints list
17 kps.append(cv2.KeyPoint(x, y, self.radius))
18
19 # return the dense keypoints
20 return kps
21
22 def setInt(self, var, val):
23 if var == "initXyStep":

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected