Skip to content

Commit a27dd11

Browse files
committed
graphics: audit per-view source-camera zoom metadata and narrow-silhouette framing correction
1 parent f1b7f3f commit a27dd11

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

‎tests/corpus/test_corpus4008_2d_art_orbit_v1.py‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ def scene(tmp_path, *, nviews=8, alpha_offset=0):
3333
"view_id":f"SOURCE_ORBIT_{i:02d}",
3434
"source_space_orbit_degrees":45*i,
3535
"camera_source_space_matrix":matrix,
36+
"camera_projection_details":{
37+
"camera_ortho_scale":2.0,
38+
"source_bbox_correction_based_on_not_human_court":True,
39+
},
3640
"source_reference_png":ref.name,
3741
"source_reference_sha256":sha(ref),
3842
"cel_candidate_png":cel.name,
@@ -116,3 +120,14 @@ def test_bad_view_matrices_fail_even_if_images_look_good(tmp_path):
116120
p.write_text(json.dumps(d))
117121
with pytest.raises(ValueError,match="DUPLICATE_CAMERA"):
118122
audit(tmp_path)
123+
124+
125+
def test_source_space_framing_can_fit_narrow_character_without_hiding_camera_metadata():
126+
from tools.corpus.blender_corpus4008_2d_art_orbit_pilot_v1 import choose_ortho_scale
127+
old=2.0
128+
scale=choose_ortho_scale(old,0.30,0.43)
129+
assert 0.5<scale<old
130+
newwidth=0.30*old/scale
131+
newheight=0.43*old/scale
132+
assert newwidth>=0.42
133+
assert newheight<=0.90

0 commit comments

Comments
 (0)