推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
LeCent
V2EX  ›  Python

如何根据固定物体(如 A4 纸、大纸箱)在画面中的大小与实际大小的关系来自动获取(ip)camera 的高度?

  •  
  •   LeCent · Mar 26, 2018 · 2863 views
    This topic created in 3113 days ago, the information mentioned may be changed or developed.

    opencv

    6 replies  •  2018-03-29 10:23:52 +08:00
    robot777
        1
    robot777  
       Mar 26, 2018
    可以搜摄像机标定,最简单是建立一个 y=ax+b 的模型。不过我不知道你这样一个纸盒常量够不够,以前都是拿摄像机高度作为常量的。
    zhjits
        2
    zhjits  
       Mar 26, 2018
    LeCent
        3
    LeCent  
    OP
       Mar 26, 2018
    @robot777 #1 這個是圖像矯正?
    robot777
        4
    robot777  
       Mar 26, 2018
    你不需要校正,校正是对于镜头畸变的,你可以选择把纸盒放在镜头中心比较正的位置,这样用简单模型误差也不会很大。需要摄像头焦距什么的一些参数。
    ruoyu0088
        5
    ruoyu0088  
       Mar 26, 2018
    首先用 https://docs.opencv.org/3.3.1/dc/dbb/tutorial_py_calibration.html 中介绍的方法照相机的 camera matrix, distortion coefficients 参数。

    然后用 https://docs.opencv.org/3.3.1/d7/d53/tutorial_py_pose.html 中介绍的 solvePnP 函数计算出旋转和偏移向量。
    LeCent
        6
    LeCent  
    OP
       Mar 29, 2018
    @ruoyu0088 #5 能问一下具体怎么操作吗?(参数是怎么获得的?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1180 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 16:51 · PVG 00:51 · LAX 09:51 · JFK 12:51
    ♥ Do have faith in what you're doing.