forked from Github/frigate
Fix: workaround for drawing non-latin characters (#7686)
* Add transliteration support to draw_box_with_label function * isort
This commit is contained in:
committed by
GitHub
parent
3dd0192fe6
commit
500d369c50
@@ -5,7 +5,7 @@ import numpy as np
|
||||
from norfair.drawing.color import Palette
|
||||
from norfair.drawing.drawer import Drawer
|
||||
|
||||
from frigate.util.image import intersection
|
||||
from frigate.util.image import intersection, transliterate_to_latin
|
||||
from frigate.util.object import (
|
||||
get_cluster_boundary,
|
||||
get_cluster_candidates,
|
||||
@@ -82,6 +82,11 @@ class TestRegion(unittest.TestCase):
|
||||
|
||||
assert len(cluster_candidates) == 2
|
||||
|
||||
def test_transliterate_to_latin(self):
|
||||
self.assertEqual(transliterate_to_latin("frégate"), "fregate")
|
||||
self.assertEqual(transliterate_to_latin("utilité"), "utilite")
|
||||
self.assertEqual(transliterate_to_latin("imágé"), "image")
|
||||
|
||||
def test_cluster_boundary(self):
|
||||
boxes = [(100, 100, 200, 200), (215, 215, 325, 325)]
|
||||
boundary_boxes = [
|
||||
|
||||
Reference in New Issue
Block a user