0

我努力了

  • 我在lib上方使用仿射变换并返回图像变换的缩放、旋转和中心..
  • 它给出了价值观
scaling : 327.805670381418,327.805670381418
rotation : -0.1310210334156003
transformation : 7179251.8557908312,6022627.228704552

// center of image from affine
const translationX = transformation.getTranslation()[0];
const translationY = transformation.getTranslation()[1];
extent = transformExtent([translationX - (xScale * this.imageData.width / 2),
        translationY - (yScale * this.imageData.height / 2),
        translationX + (xScale * this.imageData.width / 2),
        translationY + (yScale * this.imageData.height / 2)],
        get('EPSG:3857'), get('EPSG:4326'));
const imageProjection = this.returnRotateProjection(
        viewProjection,
        fromLonLat([transformation.getTranslation()[0], transformation.getTranslation()[1]], 'EPSG:4326'),
        transformation.getRotation(),
        extent
      );
const imgSource = new Static({
        url: this.imgURL,
        projection: imageProjection,
        imageExtent: extent,
        imageSize: [this.imageData.width, this.imageData.height],
        imageLoadFunction : (image) => {
          image.getImage().src = this.imgURL;
          if (image.resolution === undefined) {
            image.resolution = (image.extent[3] - image.extent[1]) / image.image_.height;
          }
          image.state = 2; // ImageState.LOADED;
          image.unlistenImage_();
          image.changed();
        }
      });
  • 这里的问题是图像分辨率很差,像曲线形状的图像显示
  • 是否有可能找到 4 个角(使用图像中心和旋转图像中心点和宽度、高度、缩放的边界框)
  • 建议或帮助..提前谢谢..节省我的时间.. gis
4

0 回答 0