xiatong
V2EX  ›  问与答

魔方色块识别。

  •  
  •   xiatong · Dec 29, 2018 · 2331 views
    This topic created in 2720 days ago, the information mentioned may be changed or developed.

    怎么根据一张魔方的图片,识别出色块的颜色和位置呢?

    1 replies    2018-12-29 10:35:40 +08:00
    coderluan
        1
    coderluan  
       Dec 29, 2018
    用 opencv 的话,思路是这样的,先转 hsv,然后用 inRange 对相应颜色二值化处理,在做一下形态学变换 erode/dilate/morphology 优化一下,最后用 findContours 找到轮廓,最后再 convexHull 求一下外接多边形。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   944 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 22:21 · PVG 06:21 · LAX 15:21 · JFK 18:21
    ♥ Do have faith in what you're doing.