ipa320 / cob_perception_common

Apache License 2.0
13 stars 60 forks source link

Extend image_flip to cope with other image formats #85

Open fmessmer opened 6 years ago

fmessmer commented 6 years ago

As found during https://github.com/ipa320/cob_robots/pull/720#pullrequestreview-64362574, image_flip currently is only able to flip images that have format CV_8UC3

fmessmer commented 6 years ago

idea from @ipa-bnm additionally, it would make sense to implement image_flip in a lazy matter, i.e. only process and publish messages if there are other nodes sunscribed to the outgoing messages

ipa-rmb commented 6 years ago

Yes good idea. If we are lucky, one of my students will have time during the next 2 months to implement these requests.

ipa-rmb commented 6 years ago

When .at(v,u) is used for access then we could have a typedef mapping depending on 8,16,32,64 bit, data type (uchar, char, short, ushort, uint, int, int64?, float, double) and channels (1,2,3,4).

We can do something similar for the case with pointers and template/typedef the pointer type (or just use the slower .at operator likewise).