コード例 #1
0
    def is_good(self, filename):
        t = Trace(self.raw_path, filename)

        if t.white_perc > self.white_perc_thr:
            print('too crowded: ', t.white_perc)
            return False
        t.compute_inertia()
        if t.eccentricity_from_inertia < self.eccentricity_thr:
            print('too spherical ', t.eccentricity_from_inertia)
            return False

        self.interesting_count += 1
        return True