ethz-asl / maplab

A Modular and Multi-Modal Mapping Framework
https://maplab.asl.ethz.ch
Apache License 2.0
2.6k stars 721 forks source link

Attach color images to VI map #105

Open german-rodriguez-imatia opened 5 years ago

german-rodriguez-imatia commented 5 years ago

Hi,

I need to attach color images to my VI map for a dense reconstruction with pmvs. I am running Rovioli on VIO mode with --map_builder_save_image_as_resources flag set to true. Grayscale images are saved under resource folder, but Is it possible to attach color images instead of grayscale images? I also tried to use resource importer. I have clone and built march 2018 candidate release, but resource_importer package is not available on my workspace.

Thank you,

mfehr commented 5 years ago

Hi @germanrodriguezlopezdelavega

Is it possible to attach color images instead of grayscale images?

No, it's currently not possible, the flag only attaches the images that are used for mapping.

I also tried to use resource importer

That's the way to go. It is definitely available in the march release branch (Have a look here). You have to build the package, as it is not a dependency of the maplab metapackage. I just added this to the instructions on the wiki.

german-rodriguez-imatia commented 5 years ago

Thank you @mfehr, I built resource_importer package and that worked.

Now, when i run resource importer, the following error is reported: F1016 10:50:48.991763 11085 resource-importer.cc:146] This image resource type is currently not supported by this importer! encoding: bayer_rggb8

How can I solve this?

Thank you,

mfehr commented 5 years ago

If you follow the error message you will see that we currently only implemented the import function for depth images (TYPE_16C1) and color images (TYPE_8C3) and not all 50+ possible types.

The color image format we support is the opencv cv::Mat with 3 unsigned 8 bit channels so you will need to add an additional if case here and convert the image to the correct cv::Mat format (basically the image we store here for the supported color image)