Main Menu

ImageRegion

Started by Mammut, July 04, 2022, 10:57:32 PM

Previous topic - Next topic

Mammut

Hi,

do you know a software which uses the ImageRegion from XMP-iptcExt?

I didn't find examples and I'm not sure if my metadata is correct so I'd like to try it.

  "ImageRegion": [{
    "ImageRegion": [{
      "Name": "Test Name",
      "Name-hu": "Tesztnév",
      "RCtype": [{
"Identifier": "human",
        "Name": "Human",
"Name-hu": "Ember"
      }],
      "RRole": [{
"Identifier": "subjectArea",
        "Name": "Subject area",
"Name-hu": "Téma"
      }],
      "RegionBoundary": {
        "RbH": 0.155922,
        "RbUnit": "relative",
        "RbW": 0.103,
        "RbX": 0.2325,
        "RbY": 0.14093
      }
    }]
  },{
    "ImageRegion": [{
      "Name": "Test Item",
      "Name-hu": "Teszttárgy",
      "RCtype": [{
"Identifier": "product",
        "Name": "Product",
"Name-hu": "Termék"
      }],
      "RRole": [{
"Identifier": "subjectArea",
        "Name": "Subject area",
"Name-hu": "Téma"
      },
  {
  "Identifier": "cropping",
  "Name": "Cropping",
  "Name-hu": "Vágás"
  }],
      "RegionBoundary": {
        "RbH": 120,
        "RbUnit": "pixel",
        "RbW": 240,
        "RbX": 10,
        "RbY": 10
      }
    }]
  }]


Thanks!

edit: of course, I tried exiftool and it imports it without a problem, so I guess it is correct but I'm still not sure how other programs use the data (especially the multi-lingual parts or the multiple roles at the second one).

StarGeek

There may be software that uses XMP-iptcExt:ImageRegion structure, but I haven't come across any so far.  The XMP-mwg-rs:RegionInfo is much more common as it was one of the first standards created.

If you're unsure, you can try converting the IPTC region into a MWG region using the convert_regions.config file and see if that is loaded correctly.  I believe that DigiKam will read MWG regions, maybe DarkTable.  I think Lightroom should also be able to read them as well.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Mammut

#2
Thanks for the answer.

The problem with mwg-rs:RegionInfo is that it's mostly used for only Face (and there are no other types just Face, Pet, Focus, and BarCode) and the name is not Alt, it's only text, so it's not multi-lingual.

I'd like to create similar images like this one, but with multi-lingual metadata regions and not with numbers (and, of course, these images could be much more complex, so the possibility of different types and roles in the XMP-iptcExt would be very useful*):



If no program supports it then I need to write some viewer app.
(Although I think I need to write it anyway because they rarely support multiple languages, when I tried dc:description, most of the time they just ignored them or sometimes they appended the text of the other languages to the main description's text.)

But I don't want to put invalid data into the images, that's my main problem.

*even the polygons could be useful

Phil Harvey

Polygons would be a good idea.  I think you are probably stuck writing your own viewer for the features you want, and if so you might as well create your own region metadata format so you can use polygons.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Mammut

Yeah, when there are too many parts the overlapping rectangles could be messy. Of course it can also happen with the normal face rectangles when there are too many people in a photo.

I planned to write an app for creating such images, now it will be a little more complex. Well, c'est la vie.

But no need to create a new format, as Iptc4xmpExt:rbShape can be rectangle, circle or polygon. In the documentation (I think at Acdsee) you mentioned that we should use existing tags instead of creating new ones. ;) I'm trying to take that advice. :)

I really don't know why no one uses this tag.

Phil Harvey

Right you are.  I forgot that the Iptc4xmp region supported polygons.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).