ExifTool Forum

ExifTool => Newbies => Topic started by: stepan on March 22, 2017, 12:58:19 PM

Title: RegionName and RegionArea fields mismatch
Post by: stepan on March 22, 2017, 12:58:19 PM
I wrote bash script to crop faces from JPG files exported from Adobe Lightroom.
Calculating of crops positions is OK, but I have problem to get right name because some regions can be unnamed and index of RegionArea is than not matching index in RegionName list.
I am simply calling exiftool img.jpg and then parsing fields by bash and grep.

#Region Area H                   : 0.06900, 0.07605, 0.06471, 0.07689, 0.07671, 0.07546
#Region Area W                   : 0.04701, 0.05099, 0.04225, 0.05082, 0.05411, 0.05125
#Region Area X                   : 0.29349, 0.41351, 0.45454, 0.39441, 0.18491, 0.72602
#Region Area Y                   : 0.29258, 0.55951, 0.28005, 0.29191, 0.24728, 0.24704
#Region Name                     : Alice, Bob, Charlie


Is there some way to get names right? For example to get full RegionName list with some values empty?
Or is it problem that data are not written right by Lightroom?

I can bypass this problem by deleting of unnamed faces first, but that would involve working on copy of data, ...
Title: Re: RegionName and RegionArea fields mismatch
Post by: Phil Harvey on March 22, 2017, 01:03:40 PM
I'm afraid that you will have to add -struct to the command and parse the structures.

- Phil
Title: Re: RegionName and RegionArea fields mismatch
Post by: stepan on March 22, 2017, 01:20:46 PM
Yes, that is what I was missing.

Thanks a lot!