【问题标题】:Recognize randomly placed object with the same shape识别随机放置的具有相同形状的对象
【发布时间】:2017-01-25 07:17:32
【问题描述】:

获取随机放置对象的确切位置的最佳方法是什么,如下图所示:

我想构建机器人应用程序,以便机器人能够从盒子中随机挑选金属零件。所以我们有一个盒子,里面有很多提到的零件,随机扔在那个盒子里。机器人一定是在拾取这些物体并将它们放入另一个空盒子中。

感谢大家的回答!

【问题讨论】:

  • 最好的披萨是什么?
  • Piglet 的答案是正确的,但我会详细说明一下,您也许可以使用 SIFT 找到这样的部分,如果您非常幸运,您可能会选择一些分数从一个箱子中取出零件,但随机箱子拣选是一个非常困难的问题,被认为没有完全解决。如果您是学生,请先尝试解决从平面上拾取零件的问题。

标签: image-processing pattern-matching robotics object-detection object-recognition


【解决方案1】:

假设比较图像具有相同的比例:

// read template and convert it to polar coordinates
int radius = 100;
Mat target = imread("target.jpg);

Mat template;
cvLinearPolar(target, template, Point(target.cols/2, target.rows/2), ...);

// read src
Mat src = imread("src.jpg);

// initialize values to store best match
double best_score = DBL_MAX;
double best_x = -1;
double best_y = -1;
double best_angle = -1;

for (x=0;x<src.width;x++)
  for (y=0;y<src.height;y++) {
    Mat polar;
    cvLinearPolar(src, polar, Point(x,y), ...);

    ... calculate the best rotation angle that produces smallest difference
    ... between matched template and a calculated polar image

    if (min_difference < best_score) {
       ... update score, x, y, angle ...
    }
}

... best_x, best_y, best_angle should now store the best object location

【讨论】:

  • 对于随机分箱拾取,零件的比例不同。
猜你喜欢
  • 2013-06-28
  • 2013-02-02
  • 2012-11-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-12-11
相关资源
最近更新 更多