Tag manipulation over large image sets
December 2011
One of my current interests is the management of tags on photo sets. Usually a set will be between 20 and 200 images,
thumbed onto a 1920x1080 wide screen monitor at about 100x100 pixels with vertical scrolling. Thumbs are selectable,
deslectable, CTRL + A for all and drag select enabled with a couple of jQuery UI libraries.
In this project, tags are associated with an entity, there are 3 simple entities which represent the file structure:
Each entity is a db table with at least an id and name column. Tags in this system are Key:Value pairs, there is scope
for meta data per tag possibly to be implemented at a later date.
A system table 'sys_tags' contains a list of all tags in the system across all entities:
- tname
- calias
- cname
- cgroup
- ctype
Tags are essentially table columns with this sys_tags table keeping track of everything, since all 'tags' must comprise at
least a key and value, we can map the key to a column name and the value as a record value. Bare in mind that if I create
5 tags A,B,C,D and E against the images entity, each image can take on a value for each tag, of course this creates a
massively sparse table which I'm accepting of for the time being.
Note: Why accept such a sparse table structure? Right now I'm interested in a tool for managing tagged data, I've tried
a few different approaches and this is just a new model. Please read more about tools for this model before passing any
judgements.
So a case in point where we pull EXIF meta data from each image and map it to a tag, different camera
manufacturers add very different data and even similar data can be tagged with different keys and values can be
represented in varying foramts. A straight copy+paste of the EXIF data from a set of about 2k images from different
cameras resulted in about 200 columns in the images table, a snapshot of 10 tags/columns:
19 exif_make
20 exif_model
21 exif_orientation
22 exif_xresolution
23 exif_yresolution
24 exif_resolutionunit
25 exif_software
26 exif_datetime
27 exif_ycbcrpositioning
28 exif_exififdpointer
29 exif_thumbnailcompression
30 exif_thumbnailxresolution
31 exif_thumbnailyresolution
You can see all these tags are prefixed 'exif_', this matches their group which allows me to seperate user-created
tags from automated tagging.
spreading tags
current selection
current set