iscc / iscc-core

ISCC - Codec & Algorithms
https://core.iscc.codes/
Apache License 2.0
15 stars 3 forks source link

Comparison of svg digital objects #129

Open ll4strw opened 4 months ago

ll4strw commented 4 months ago

This is a question rather than an issue.

How would one compare two svg images to detect similarities? I understand that an svg object should be treated as text as far as its content goes. Supposing I have two svgs which differ only in a path element with the first one colored using #97C024 and the second using #97C020, if I create my iscc codes from instance, content(text), and data units and compare them I obtain a similarity of 74% calculated with iscc_similarity. Would not such a value be an underestimation of their similarity? The analyzed svgs should be practically considered equal. How would I use the ISCC algorithms to spot such subtle differences? Thanks in advance.

titusz commented 4 months ago

Vastly different SVG markup could result in nearly identical rendered images and the other way around. So the recommended way would be to first rasterize the SVG and create an Content-Code Image. The ISCC-SDK does not yet have support for SVG files, but it will likely be added soon.