Ask Your Question
0

saving TIFF tags in header?

asked 2016-09-13 11:13:02 -0600

pmh4514 gravatar image

When saving an OpenCV mat, is it possible to add TIFF tags to the header? I need to store pixel dimensions in the image header.
Thanks!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
3

answered 2016-09-14 03:52:00 -0600

kbarni gravatar image

updated 2016-09-14 10:51:57 -0600

The TIFF format is very powerful and versatile. In addition to storing image metadata, it allows storing multiple channels, different data formats, etc.

Opencv's imwrite is a handy little function to save an image, but it won't allow you to do complex operations like metadata handling and exotic formats (like multispectral data).

Fortunately there is the libTIFF library, which is quite easy to use and it can handle any kind of TIFF data.

You can find several tutorials for using this library (e.g. here)

edit flag offensive delete link more

Comments

Thank you.

pmh4514 gravatar imagepmh4514 ( 2016-09-14 10:34:32 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-09-13 11:13:02 -0600

Seen: 2,598 times

Last updated: Sep 14 '16