Author Topic: Add keyword to exif/iptc meta data on the fly  (Read 4712 times)

ihayes916

  • New to the forum
  • *
  • Posts: 5
Add keyword to exif/iptc meta data on the fly
« on: August 28, 2014, 06:31:50 AM »
Greetings All-

I've looked...and looked, and I don't think this has been requested yet...if it has, my most sincere apologizes.

Is it possible to add "user defined"  tags to the keyword metadata field of an image (jpeg and/or raw)?  I'm a .net developer and part time photographer trying to get into high volume photography (think youth sports, schools, etc...)

Here would be my ideal workflow...

1) Have a companion android app that has a list of all the subjects that i would be photographing (Ben, Jane, Joe)...
2) tether a tablet to camera running ML...
3) open android app and select "Ben" (say Ben has a unique ID - "12345")...
4) take pictures of Ben...
with each picture taken, "12345" is added to the the keyword field by ML...
5) select new subject in andriod app (Jane  ID - "67890")
6) take pictures of Jane
now, "67890" will be added to each picture taken by ML...

Rinse and Repeat.  :)

Now, in post processing, i can write a simple c#/.net app that will read the metadata for each image and sort them, by subject, automatically!  viola!!!!!!!! 1000's of photos sorted in seconds :D  :D

The key....adding/tagging the metadata to the images WHEN i shoot....

Really looking forward to finding out if this is even possible....

Thank you all in advance!
Canon 5D MarkII

dpjpandone

  • Senior
  • ****
  • Posts: 284
Re: Add keyword to exif/iptc meta data on the fly
« Reply #1 on: August 31, 2014, 12:54:15 AM »
7D and others allow user-defined prefix to be added to filename through canon menu. should work for your purposes.

ihayes916

  • New to the forum
  • *
  • Posts: 5
Re: Add keyword to exif/iptc meta data on the fly
« Reply #2 on: September 02, 2014, 05:07:26 PM »
@dpjpandone - thank you for your reply!  I have seen that the 7d studio version has bar-code/scanning capabilities...but I'm shooting w/ a 5D MarkII (I probably should have mentioned that in the first post) and am not in the market for another camera body at the moment.  :)

Having said that, does anyone know if my original request/vision is even technically possible?

Thanks all!
Canon 5D MarkII

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3146
  • 60Da / 1100D / EOSM
Re: Add keyword to exif/iptc meta data on the fly
« Reply #3 on: September 02, 2014, 05:30:47 PM »
Why not just use timestamps?

Select a picture in your android app and it simply records the time and the subject selected, then your post processing app would look at the timestamps on the images and the timestamps from the android app and sort the images appropriately.

ihayes916

  • New to the forum
  • *
  • Posts: 5
Re: Add keyword to exif/iptc meta data on the fly
« Reply #4 on: September 02, 2014, 07:12:05 PM »
@dmilligan - timestamp?  interesting thought...

I had worked thorough one solution using timestamps...i basically marked the time when the subject would come up to the camera (DateTime.NOW() ex 6:00 pm) and then took a bunch of pics for that subject, then marked the time for the next subject (DateTime.NOW() ex 6:05pm) and took a bunch of pics, etc....then i would use the DateTime(s) as "subject separators"...basically all images from 6:00pm till the next separator  belongs to subject A - all images from 6:05pm till the next separator belong to subject B, etc....
The problem find is that DateTime can be inaccurate between devices (camera time, tablet time, etc) and at the end of the day...this still seems to be a "work around" for me, rather than a fool proof solution.

If I can just select the subject in the companion tablet/android app and know that the subjects unique ID will be written to the keyword field of every image I take, until a new subject is selected, then I believe I have a water tight, and dare say, almost fool/error proof solution. 

Additionally, having that unique ID in the EXIF metadata (keyword field) offers the greatest deal of flexibility for other workflows...I personally use LightRoom...now, if i want to find all of "Ben's" images (ID-12345) I can do a keyword search for "12345" and all those images will be found.  Also, a lot of photo hosting sites (i use SmugMug for example) will extract keyword metadata for site searching....so now, I can give "Ben's" parents his unique ID, they can go to my site and use that ID to find all other their kids photos! 

Long winded of me, I'm sure, but just wanted to paint the full vision I have.  :)

Thoughts?
Canon 5D MarkII

chmee

  • Hero Member
  • *****
  • Posts: 1025
  • raw2cdng
Re: Add keyword to exif/iptc meta data on the fly
« Reply #5 on: September 02, 2014, 08:21:13 PM »
Yepp. Timestamp in android-app, when selecting New Tag, save in database (CSV?) and later, on PC, append to corresponding pictures.

ihayes916

  • New to the forum
  • *
  • Posts: 5
Re: Add keyword to exif/iptc meta data on the fly
« Reply #6 on: September 02, 2014, 08:40:29 PM »
thanks @chmee !!

If I am already tethered w/ an android app, why not write the unique ID directly to the metadata of the picture(s)?  No need to deal w/ DateTime...plus all the other benefits I mentioned.  Just seems more error prone to go w/ TimeStamps rather than get data directly from an existing metadata field...

All that said, and I thank you all for your thoughts and input, is it even possible to write to metadata in camera?



Canon 5D MarkII

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3146
  • 60Da / 1100D / EOSM
Re: Add keyword to exif/iptc meta data on the fly
« Reply #7 on: September 03, 2014, 06:17:44 PM »
AFAIK, we have not reverse engineered the Canon code that writes the CR2 metadata (but I could be wrong), so writing stuff to CR2 metadata is going to be really hard (it's also "dangerous" interfering with code that writes the actual images, any bugs could potentially cause data loss in image files). Either you need to reverse engineer this or port something like exiftool to ML.

Really the way to go is with timestamps, it's so much simpler and there are many advantages:
You don't have to have ML, in fact you can support just about any camera.
It will work for multiple cameras at the same time.
You don't have to do any reverse engineering.
You don't have to communicate with the camera.

If you're worried about synchronization, well, just synchronize your clocks before the shoot.

Just seems more error prone to go w/ TimeStamps rather than get data directly from an existing metadata field...
Disagree => a complicated solution (talking to the camera via hacked firmware and overwriting metadata) is going to be more error prone than a simple one (just recording the time). Remember: KISS (Keep It Simple Stupid).

If you really insist on not using timestamps you could perhaps do this: ML is capable of determining the current image filename, so it could send this to your app via PTP, and you're app could keep a record of the filenames for each subject, then apply the metadata to the CR2s in post.

ihayes916

  • New to the forum
  • *
  • Posts: 5
Re: Add keyword to exif/iptc meta data on the fly
« Reply #8 on: September 11, 2014, 02:20:10 AM »
@dmilligan...apologizes for the delayed response...been away for a bit.

...YES!!!!  I like the sound of that solution (sending file name) much better!!!!!!  :)

Then, I can just tell a companion app (yet to be developed) "I'm shooting Bob"...and every image name sent to the app by ML will be "Bob's" image! 

Is there already an example of how to send the current file name?  and also, what it PTP?  :D

Thanks again for all the great suggestions...i"m really excited to try and wire this all up.
Canon 5D MarkII

cristofayre

  • Just arrived
  • *
  • Posts: 1
Re: Add keyword to exif/iptc meta data on the fly
« Reply #9 on: March 13, 2015, 06:07:11 PM »
Rather akin to the person who used the timestamp to break up images, I have developed a system whereby the photographer photographs a QR code before each photo, and then post-processing scripts "read" that QR image, and embeds the QR code / keywords / copyright / description into photo using exiftool. The idea is that the photographer gives the QR label to the customer so that when they scan the code later, they are taken directly to their photos on Zenfolio. (A similar system already exists called "Snapizzi" ... but I've added a few extras!)

The downside is the need to photograph the label. The software can decifer poor-ish images, but I feel there is a better way. My idea is to use an Android app, and use the built in camera to photograph the barcode. Also, photos will be sent to device using Eye-Fi so the keyword can be embedded "on the fly" inside the Android ... but it's virtually impossible to find an SDK that will allow you to write IPTC codes on Android. Nearest I've got so far is "PressIPTC", and am seeing if that can be adapted to work with camera. I've got developer code for the camera side of things, but IPTC is proving elusive.

And before you ask, whilst I do plan to promote my software in time, this isn't an ad for the product; it's not even online yet, (Snapizzi is, but that's someone elses product)