I had a thought of embedding metadata into images after a building survey. This would capture the surveyors comments on the survey and store them in the the actual image files. So the next time the photo is inspected in the office the information on that image is easily inspected. Rather than looking for 2 sources of information, the information is gathered in the one file.
The nice thing about the images is that it has a date for the time it was taken. So you have a date of when ta he photo was taken. If you also had the condition of a building element, such as wall finish say condition 2 at that time, you can extrapolate on what its current condition is and when it needs to be upgraded.
You can click on an image using Explorer, and if you choose Properties of the file, you can see, in the Details tab, the metadata in the image file. See this article about editing image information in Win 10.
In this example I have added some data to the Title TAG & the Comment TAG.
Batch updating image metadata using an Import File
The above example is all well and fine, but very tedious to manage all the images individually. A better method would be to do a BATCH UPDATE with a CSV file which is filled in and then pushed into a Folder of Images.
Resources & setup
I initially thought that Knime or RapidMiner would have a few nodes that would do this, but I came up blank on that. I then looked to Python, and there were a few packages that could do this, the PIL and Py3exiv2 packages seemed to come up more frequently in Stack Overflow.
I wanted a simple process that others could use so I had Python as a backstop and looked for other alternatives.
I came across a command line editor for free called Exiftool by Phil Harvey that reads, writes and edits meta information. The App Documentation is here, and the FAQ, which is useful, is here.
There are some resources on Youtube that can be found HERE.
The thing with command line interface is that they can be fiddly. You need to get your switches right and then the programme usually runs wonderfully, but you usually have to do a lot of testing to get what you want. Once in place you can write a simple procedure for others to follow.
In setting up Exiftool you really need it on your path, in the video below it shows how you can do this, so that if you open up a command window you can type exiftool.exe and it’ll start the programme. (you can also put the exiftool.exe file in your C:/windows directory and the command line will find it there too.
Operation of exiftool.exe
There are a whole lot of option switches, see the list HERE.
This takes you to the config demo file: https://www.sno.phy.queensu.ca/~phil/exiftool/config.html that you cn cut/paste into a notepad file and save.
The first option is to rename it as a “.ExifTool_config” and windows threw a wobbly trying to do this, so I used the >exiftool -config example.config 83.jpg method to try and create tags and then test using the > exiftool -NewEXIFTag=”This is a new comment” 85.jpg but it would not recognise the tag. I even tried using the windows “” instead of the ‘ ‘ single quotes in the code but that didn’t work either.
I had previously been exploring redundant tags that I could use for my data, although their tag names are different, I could use a simple mapping process (in Excel, Knime etc) to re-map say “LensManufacturer” to “WassFinish”. I found a few TAG’S that could be used and tested them. I was looking for ones I could put text in, some were configured for integer/float/date and I couldn’t use them, but others I could.
This is the list of ones I found I could use (11):
I also found a link to some other ones : https://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Shortcuts.html I found that the IFDO ones are in the JPG images I was using, even the IFD0:PanasonicTitle & IFD0:PanasonicTitle2 (weird as its an LG camera). The ones in italics below require number/date so cannot be used, so another 13:
There is also this article that shows an awful lot of other Tag fields that can be used. I have not tested them so far.
A point about what metadata information is shown in windows explorer. When you are in file explorer and right click and go to Details tab, not all of these fields appear. If you fill in the field in one of the images using the command:
> exiftool -NewEXIFTag=”This is a new comment” 85.jpg
It will populate that field, and when you next export the directory to a CSV file the headers that have been filled out all show.
You could use a web file viewer such as this or this to upload your file to to read all the relevant metadata. But you end up wading through all of the other metadata to find what you are looking for.
I think the 3DPDF export Excel VBA macro process would be an effective way of processing the information from an image directory after a CSV export as it is easily shared and used, requiring little skill to extract the relevant information.
I think I would plan a bi-directional Excel macro mapping tool so that you had a simple table to fill in that you would then merge/overwrite the information in the Exported CSV from the Image file directory that you’d then import into the images. You’d use the reverse procedure when exporting the csv from the image directory.
The only specialist programme that you’d need to have installed is the ExifTool.exe file (8Mb). Skill level to run the Command line and basic excel macros. Not daunting technology & you could have a simple youtube video showing the complete process.
I think this is quite an elegant solution for capturing information in a relevant place as text/numeric information to back up the visual information you have from the photo itself. So mutually supporting each other.
Given the right data structure you could end up being able to push the data straight into your AMIS (Asset Management Information System) as a one off process as the data will be structured in a tabulated manner already.
I think there may be some simplification to the command line process using relative paths and using Window Explorer to navigate to the image file directly to simplify the command line prompt command.
I need to run a couple of more tests with JPG’s from different cameras (so far only used the LG 360 JPG images) to ensure that the same TAG’s are available in those files. Also maybe a TIFF and possibly other image file types. Exiftool seems to e able to manage an extensive range of file types.Tested on Sony camera jpg on one attribute & it works fine so far.
I also noted that it processes PDF files too. It only seems to export the Exif metaData which is pretty simple. It doesn’t seem to give you access to the actual programme data.