magsac icon indicating copy to clipboard operation
magsac copied to clipboard

Very verbose MAGSAC++ - is it possible to turn it off?

Open anthony-khong opened this issue 3 years ago • 3 comments

Hello. Whenever I run pymagsac.findHomography' with use_magsac_plus_plus=True` I always get really verbose prints:

Setting the core number for MAGSAC++ is deprecated.
Setting the partition number for MAGSAC++ is deprecated.

Is there a way to suppress this? I believe the prints are coming from here, but it's been hard-coded here.

Perhaps the following lines (L33-34) can be deleted if use_magsac_plus_plus is false?

    magsac->setCoreNumber(1); // The number of cores used to speed up sigma-consensus
    magsac->setPartitionNumber(partition_num); // The number partitions used for speeding up sigma consensus. As the value grows, the algorithm become slower and, usually, more accurate.

I'd be happy to create a PR if you think it'd be useful.

anthony-khong avatar Jan 27 '21 01:01 anthony-khong

I have just added GLOG, so now it can be turned off. However, you are right, the following lines can be indeed deleted if use_magsac_plus_plus is TRUE.

danini avatar Feb 17 '21 15:02 danini

Hi @danini, I wonder there are additional dependencies to the library that have not been documented (glog and gflags)? I believe it may be your most recent change.

I was building my Docker image using this Dockerfile, but I recently had to change it to this Dockerfile with more steps. Is there a more concise way to do this?

Also, in light of this, would you take a PR to add a GitHub Action pipeline to install the C++ and Python libraries?

anthony-khong avatar Feb 19 '21 09:02 anthony-khong

Hi, yes it is right. I just added glog and gflags a few days back. I have never in my life wrote Dockerfile, so I cannot help with that :) I will look into this GitHub Action pipeline, thank you for the suggestion.

danini avatar Feb 19 '21 09:02 danini