nikolaradulov / SLAMFuse

SLAM performance evaluation framework
https://apt.cs.manchester.ac.uk/projects/PAMELA/
Other
9 stars 1 forks source link

SLAMBench Dataset Generator issues: Image processing for large images #39

Open OvercodedStack opened 1 week ago

OvercodedStack commented 1 week ago

Hello SLAMFuse Team.

I have been using the SLAMBench tool for a few months now and there have been some annoyances that I had been noticing that have been creating enormous pains for me. In particular it has been the case for creating Stereo datasets with large (3200x2400) resolutions.

In short, the issue is generated inside the LoadPng() function of SLAMFrame.cpp where we try to load a large resolution image with this function and run into a "Image cannot be decoded" error. This happens the moment we use lodepng::decode() to load an image, no matter if the said image is RGB or greyscale.

image

I wouldn't say that my processing techniques are clean, or that my CRC headers for the PNG files are always guaranteed to work as I have no way of checking this, however I find it extremely strange that this issue happens completely randomly. I will be working with loading a dataset and at some point the tool breaks because the image "breaks" as the CRC header ends up being corrupted. I've tried using PNGfixers which fix the header but this does not help at all and the only fix that I have found is to simply copy/paste the image over.

My work consists of generating multiple datasets consisting of different resolutions. Sometimes they are large images (QUXGA) and sometimes they are small VGA resolutions. I would share the images but since this is part of my work at the moment, I will share this only after publication.

Since this part of the tool possibly doesn't get visited often, I will like to leave this open until this part of the tool gets replaced with a better PNG loader in the future. If my statistical tools are to believed, any resolution over UXGA will encounter an issue unless the SLAMBench tool is manually mitigated.

I've been forced to write into the code a self-checker that looks up the reference of the image that ends up being corrupt on a secondary directory which has the same image since I don't have a way of fixing this currently. Perhaps in the future I can find a way to replace this but for now, this is an enormous pain for me.

My system is in a Ubuntu 18.04 system with 128GB of RAM and 10th gen Intel processor.

Thank you for reading and have a nice day.

E.

mihaibujanca commented 1 week ago

Hi there, this looks like a libpng issue rather than a SLAMBench issue. I'd suggest writing a simple script with the same libpng you're using with SLAMBench to check whether or not you can actually load images