--
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/abf18ac8-de7f-4d9d-b541-61166fd9b5ffn%40googlegroups.com.
On 24 Sep 2024, at 17:56, 'Sameer Agarwal' via Ceres Solver <ceres-...@googlegroups.com> wrote:
Hi Paul,We are fans of colmap :)The basic problem with the WeightedCostFunction was that the temporaries needed to implement were not thread safe. Since we were trying to do this at the level of CostFunction, we did not know the size of these matrices at compile time, so we could not assume that the required temporaries could be allocated on the stack.If you are trying to do this at the level of AutoDiffCostfunction, really SizedCostFunction then things should be simpler. That said, if your aim is to only do this at the level of AutoDiffCostFunction, why not do this at the level of the functor -- as in, have a Weighted functor, which applies the weight matrix to the output of the actual costfunctor and pass that object to AutoDiffCostFunction. That way you do not have to worry about jacobians etc. Also since everything is static, the compiler should be able to inline everything.Sameer
On Tue, Sep 24, 2024 at 12:58 AM Paul-Edouard Sarlin <paul.edou...@gmail.com> wrote:
Hello everyone,In COLMAP, we have a helper that can wrap any cost functor to multiply its residuals by a diagonal weight matrix, using ConditionedCostFunction (source here). We would like to extend this to non-diagonal weight matrices. I know that there was a CR for a WeightedCostFunction, which was eventually killed (relevant discussion). This was 11 years ago - in 2024 would this be somehow easier to implement?
I gave this a try assuming an auto-diff cost functor (code here) but somehow the template deduction in operator()fails when interfacing with Ceres' internals (in variadic_evaluate.h). Do you see how I could make this work?
Many thanks.Best,Paul-Edouard Sarlin--
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/abf18ac8-de7f-4d9d-b541-61166fd9b5ffn%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Ceres Solver" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ceres-solver/R08n1xkjvVY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ceres-solver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/CABqdRUDyzf%2BkV0kgq6Nn2X5j%2BaYLn3YW740QW3tob5xXYEp68w%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/4EFCA6E4-F4AC-486F-A313-E68B5B3C8E06%40gmail.com.