• Skip to primary navigation
  • Skip to content
  • Skip to footer
🌈 μ½”λ”©μ²˜μŒμž…λ‹ˆλ‹€λ§Œ 🌈
  • CV
    λ°•μ„±μ°½ (bigbigpark)

    λ°•μ„±μ°½ (bigbigpark)

    Interested in Robotics SW

    • GitHub
    • πŸ“‚ Useful Code
      • - C++(28)
      • - Python(17)
      πŸ“‚ Study
      • - 자료ꡬ쑰 (9)
      • - μ•Œκ³ λ¦¬μ¦˜ (1)
      • - μ½”λ”©ν…ŒμŠ€νŠΈ (10)
      • - λ‘œλ³΄ν‹±μŠ€ (1)
      πŸ“‚ LIBRARY / FRAMEWORK
      • - ROS(16)
      • - ROS 2.0(3)
      • - Point Cloud Library(17)
      πŸ“‚ Linux / Ubuntu
      • - 정리 자료(6)
      πŸ“‚ Tips
      • - Trouble Shooting(14)
      • - Installation(25)
      • - Latex Syntax(1)

    [C++] Log-odds representation

    Log to Probability

    μˆ˜μ‹κ³Ό μ½”λ“œ κ΅¬ν˜„

    \[p(x) = 1 - \frac{1}{1 + e^l(x)}\]


    double l2p(double l)
    {
      return 1 - (1.0 / (1 + exp(l)));
    }
    


    Probability to Log

    μˆ˜μ‹κ³Ό μ½”λ“œ κ΅¬ν˜„

    \[l(x) = log(\frac{p(x)}{1 - p(x)})\]


    double p2l(double p)
    {
      return log(p / (1 - p));
    }
    

    Tags: gridmap, log, occupancy, odds, probability, ros

    Categories: cpp_useful

    Updated: June 19, 2022

    이전 λ‹€μŒ

    Leave a comment

    • Follow:
    • GitHub
    • Feed
    © 2024 bigbigpark. Powered by Jekyll & Minimal Mistakes.