-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
When it comes to up/down scaling of the watermark information and the test image size distribution (see #3 (comment)), we should use sqrt(w*h) as the dimension of interest.
Because what counts when it comes to how much information (payload + redundancy) can be fit into an image, is the effective pixel "budget". IOW, in the embedding code, ZOOM should determine the ratio of pixel/watermartk_information, regardless of the aspect ratio.
Illustration:
In the following three cases we want to roughly embed the same amount of information + redundancy (here the x in 4x is a multiplier determined by other settings like pattern size etc):
Wide Image, pixel budget for 4x WM tiles, e.g. 512*128:
+-+-+-+-+
| | | | |
+-+-+-+-+
Square Image, pixel budget for 4x WM tiles, e.g. 256*256:
+-+-+
| | |
+-+-+
| | |
+-+-+
Tall Image, pixel budget for 4x WM tiles, e.g. 128*512:
+-+
| |
+-+
| |
+-+
| |
+-+
| |
+-+
So we need something like sqrt(w*h) applied here, to use the same ZOOM factor for all three cases:
src/embed.py:155: ZOOM = min (face.shape[1], face.shape[0]) / Lwsmall / dynamic_zoomMetadata
Metadata
Assignees
Labels
No labels