org.openimaj.image.feature.local.keypoints.Keypoint.setX()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(94)

本文整理了Java中org.openimaj.image.feature.local.keypoints.Keypoint.setX()方法的一些代码示例,展示了Keypoint.setX()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Keypoint.setX()方法的具体详情如下:
包路径:org.openimaj.image.feature.local.keypoints.Keypoint
类名称:Keypoint
方法名:setX

Keypoint.setX介绍

暂无

代码示例

代码示例来源:origin: org.openimaj/image-local-features

@Override
public void copyFrom(Point2d p) {
  setX(p.getX());
  setY(p.getY());
}

代码示例来源:origin: openimaj/openimaj

@Override
public void copyFrom(Point2d p) {
  setX(p.getX());
  setY(p.getY());
}

代码示例来源:origin: openimaj/openimaj

protected void loadMapData() {
  for (int i = 0; i < mapKeypointFiles.length; i++) {
    try {
      // read keypoints for current tile
      final MemoryLocalFeatureList<Keypoint> map = MemoryLocalFeatureList.read(mapKeypointFiles[i],
          Keypoint.class);
      // loop through each keypoint in the tile and
      // adjust its position, so that the keypoints
      // x and y position is its true OSGB grid ref!
      for (final Keypoint k : map) {
        final int east = baseEasting[i] + Math.round(10.0f * (k.getX() / scaleFactor));
        final int north = baseNorthing[i]
            + Math.round(10.0f * ((mapDimension - k.getY()) / scaleFactor)); // different
        // coord systems!!
        k.setX(east);
        k.setY(north);
      }
      mapData.addAll(map);
    } catch (final Exception ex) {
      System.out.println(ex);
      System.exit(1);
    }
  }
}

代码示例来源:origin: org.openimaj/sandbox

protected void loadMapData() {
  for (int i = 0; i < mapKeypointFiles.length; i++) {
    try {
      // read keypoints for current tile
      final MemoryLocalFeatureList<Keypoint> map = MemoryLocalFeatureList.read(mapKeypointFiles[i],
          Keypoint.class);
      // loop through each keypoint in the tile and
      // adjust its position, so that the keypoints
      // x and y position is its true OSGB grid ref!
      for (final Keypoint k : map) {
        final int east = baseEasting[i] + Math.round(10.0f * (k.getX() / scaleFactor));
        final int north = baseNorthing[i]
            + Math.round(10.0f * ((mapDimension - k.getY()) / scaleFactor)); // different
        // coord systems!!
        k.setX(east);
        k.setY(north);
      }
      mapData.addAll(map);
    } catch (final Exception ex) {
      System.out.println(ex);
      System.exit(1);
    }
  }
}

相关文章