colmap
colmap copied to clipboard
Check failed: max_num_elems
I'm studying the nerfies https://github.com/google/nerfies and using colmap to create a dataset of images.
when execute with
colmap exhaustive_matcher
--SiftMatching.use_gpu 0
--database_path "{str(colmap_db_path)}"
in "Nerfies_Capture_Processing.ipynb", a failure report is shown as:
F0402 02:21:26.684835 182500 cache.h:132] Check failed: max_num_elems > 0 (0 vs. 0) *** Check failure stack trace: *** @ 0x7f8caf9285cd google::LogMessage::Fail() @ 0x7f8caf92a433 google::LogMessage::SendToLog() @ 0x7f8caf92815b google::LogMessage::Flush() @ 0x7f8caf92ae1e google::LogMessageFatal::~LogMessageFatal() @ 0x744b45 colmap::LRUCache<>::LRUCache() @ 0x7394b6 colmap::FeatureMatcherCache::Setup() @ 0x739955 colmap::ExhaustiveFeatureMatcher::Run() @ 0x882ecc colmap::Thread::RunFunc() @ 0x7f8cac918b30 (unknown) @ 0x7f8cad03f6ba start_thread @ 0x7f8cabe2d41d clone @ (nil) (unknown)
I want to know the reason of this failure and how to fix it.
Thanks a lot!
For those who find this ticket by the error message, check that:
- the image path is correct
- your libfreeimage is compiled with the image format you use enabled (mine was without jpeg by some reason)
Hi @Equidamoid when you say:
your libfreeimage is compiled with the image format you use enabled.
How can I see which type is enabled?
Package: freeimage
Version: 3.18.0
Port-Version: 24
Depends: imath, jxrlib, libjpeg-turbo, libpng, libraw, libwebp, openexr, openjpeg, tiff, zlib
Architecture: x64-linux
Multi-Arch: same
Abi: f03585f7da8056b44de1bca8a13acf22b0b43eedbefa486da3d23a9ad283eee5
Description: Support library for graphics image formats
Type: Port
@paudom
welp, for me this question was easy to answer: I just looked at the Portage's use flags for media-libs/freeimage
.
I briefly looked into the headers installed by freeimage
, and I don't see any configuration info there, so the only thing left for me now is to make assumptions (it's a looooooong time since I touched port files, and it was on mac, so it may not count). The best way to know is to look at the compilation logs, I suppose. Or write a small "hello world" that tries to open the files you have with freeimage.
I see that your package manager lists openjpeg as a dependency, so I'd guess that your freeimage is built with jpeg support. Not sure what format you need.
I had a similar issue on windows and for me the problem was due to the path to the feature files being too long. Moving the files to a base folder with shorter name solved the issue
I have LongPathsEnabled set to 1 in the registry but it doesn't seem to make a difference in this case
don't use something like .png, it's too big, try the .jpg
For those who find this ticket by the error message, check that:
- the image path is correct
- your libfreeimage is compiled with the image format you use enabled (mine was without jpeg by some reason)
This helped. I had inputted the wrong path :)