MCPcopy Create free account
hub / github.com/ComputationalRobotics/XM-code / delete_thereshold

Function delete_thereshold

utils/checkconnection.py:4–13  ·  view source on GitHub ↗
(min_threshold, M, data)

Source from the content-addressed store, hash-verified

2import networkx as nx
3
4def delete_thereshold(min_threshold, M, data):
5 valid_frames = np.bincount(data, minlength=M)
6 valid_indices = valid_frames > min_threshold
7 wrong_indices = valid_frames <= min_threshold
8 num_valid_frames = np.sum(valid_indices)
9 frame_index = np.zeros(M, dtype=int)
10 frame_index[valid_indices] = np.arange(num_valid_frames)
11 frame_index[wrong_indices] = -1
12 max_frame = np.argmax(valid_frames)
13 return max_frame, num_valid_frames, frame_index
14
15def checklandmarks(edges, landmarks, weights, rgbs, N, M):
16 # delete and reindex the frames that contains zero landmarks

Callers 1

checklandmarksFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected