仿真图像采样
parent
e19d039014
commit
357cf2ec66
|
|
@ -46,7 +46,7 @@ void QLookTableResampleFromWGS84ToRange::onpushButtonLookTableWGS84SelectClicked
|
||||||
{
|
{
|
||||||
QString fileNames = QFileDialog::getOpenFileName(
|
QString fileNames = QFileDialog::getOpenFileName(
|
||||||
this,
|
this,
|
||||||
tr(u8"选择成像粗平面文件"),
|
tr(u8"选择WGS84文件"),
|
||||||
QString(),
|
QString(),
|
||||||
tr(ENVI_FILE_FORMAT_FILTER)
|
tr(ENVI_FILE_FORMAT_FILTER)
|
||||||
);
|
);
|
||||||
|
|
@ -62,9 +62,9 @@ void QLookTableResampleFromWGS84ToRange::onpushButtonLookTableWGS84SelectClicked
|
||||||
|
|
||||||
void QLookTableResampleFromWGS84ToRange::onpushButtonLookTableRangeSelectClicked(bool)
|
void QLookTableResampleFromWGS84ToRange::onpushButtonLookTableRangeSelectClicked(bool)
|
||||||
{
|
{
|
||||||
QString fileNames = QFileDialog::getOpenFileName(
|
QString fileNames = QFileDialog::getSaveFileName(
|
||||||
this,
|
this,
|
||||||
tr(u8"选择成像粗平面文件"),
|
tr(u8"保存斜距平面文件"),
|
||||||
QString(),
|
QString(),
|
||||||
tr(ENVI_FILE_FORMAT_FILTER)
|
tr(ENVI_FILE_FORMAT_FILTER)
|
||||||
);
|
);
|
||||||
|
|
@ -80,9 +80,9 @@ void QLookTableResampleFromWGS84ToRange::onpushButtonLookTableRangeSelectClicked
|
||||||
|
|
||||||
void QLookTableResampleFromWGS84ToRange::onpushButtonLookTableCountSelectClicked(bool)
|
void QLookTableResampleFromWGS84ToRange::onpushButtonLookTableCountSelectClicked(bool)
|
||||||
{
|
{
|
||||||
QString fileNames = QFileDialog::getOpenFileName(
|
QString fileNames = QFileDialog::getSaveFileName(
|
||||||
this,
|
this,
|
||||||
tr(u8"选择成像粗平面文件"),
|
tr(u8"保存统计采样平面文件"),
|
||||||
QString(),
|
QString(),
|
||||||
tr(ENVI_FILE_FORMAT_FILTER)
|
tr(ENVI_FILE_FORMAT_FILTER)
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -293,7 +293,14 @@ void InterploateAtiByRefDEM(QString& ImageLLPath, QString& ImageDEMPath, QString
|
||||||
double lon = imglonArr(i, j);
|
double lon = imglonArr(i, j);
|
||||||
double lat = imglatArr(i, j);
|
double lat = imglatArr(i, j);
|
||||||
Landpoint point = demimg.getRow_Col(lon, lat);
|
Landpoint point = demimg.getRow_Col(lon, lat);
|
||||||
|
|
||||||
|
if (point.lon<1 || point.lon>demimg.width - 2 || point.lat < 1 || point.lat - 2) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else {}
|
||||||
|
|
||||||
Landpoint p0, p11, p21, p12, p22;
|
Landpoint p0, p11, p21, p12, p22;
|
||||||
|
|
||||||
p0.lon = point.lon;
|
p0.lon = point.lon;
|
||||||
p0.lat = point.lat;
|
p0.lat = point.lat;
|
||||||
|
|
||||||
|
|
@ -414,17 +421,13 @@ int ReflectTable_WGS2Range(QString dem_rc_path,QString outOriSimTiffPath,QStrin
|
||||||
{
|
{
|
||||||
gdalImage sim_rc(dem_rc_path);
|
gdalImage sim_rc(dem_rc_path);
|
||||||
gdalImage sim_sar_img = CreategdalImage(outOriSimTiffPath, OriHeight, OriWidth, 2, sim_rc.gt, sim_rc.projection, false);// ×¢ÒâÕâÀï±£Áô·ÂÕæ½á¹û
|
gdalImage sim_sar_img = CreategdalImage(outOriSimTiffPath, OriHeight, OriWidth, 2, sim_rc.gt, sim_rc.projection, false);// ×¢ÒâÕâÀï±£Áô·ÂÕæ½á¹û
|
||||||
gdalImage sim_sar_count_img = CreategdalImage(ori_sim_count_tiffPath, OriHeight, OriWidth, 1, sim_rc.gt, sim_rc.projection, false);// 注意这里保留仿真结果
|
|
||||||
for (int max_rows_ids = 0; max_rows_ids < OriHeight; max_rows_ids = max_rows_ids + 1000) {
|
for (int max_rows_ids = 0; max_rows_ids < OriHeight; max_rows_ids = max_rows_ids + 1000) {
|
||||||
Eigen::MatrixXd sim_sar = sim_sar_img.getData(max_rows_ids, 0, 1000, OriWidth, 1);
|
Eigen::MatrixXd sim_sar = sim_sar_img.getData(max_rows_ids, 0, 1000, OriWidth, 1);
|
||||||
Eigen::MatrixXd sim_sarc = sim_sar_img.getData(max_rows_ids, 0, 1000, OriWidth, 2);
|
Eigen::MatrixXd sim_sarc = sim_sar_img.getData(max_rows_ids, 0, 1000, OriWidth, 2);
|
||||||
Eigen::MatrixXd sim_sar_count = sim_sar_count_img.getData(max_rows_ids, 0, 1000, OriWidth, 1);
|
|
||||||
sim_sar = sim_sar.array() * 0 - 9999;
|
sim_sar = sim_sar.array() * 0 - 9999;
|
||||||
sim_sarc = sim_sar.array() * 0 - 9999;
|
sim_sarc = sim_sar.array() * 0 - 9999;
|
||||||
sim_sar_count = sim_sar_count.array() * 0;
|
|
||||||
sim_sar_img.saveImage(sim_sar, max_rows_ids, 0, 1);
|
sim_sar_img.saveImage(sim_sar, max_rows_ids, 0, 1);
|
||||||
sim_sar_img.saveImage(sim_sarc, max_rows_ids, 0, 2);
|
sim_sar_img.saveImage(sim_sarc, max_rows_ids, 0, 2);
|
||||||
sim_sar_count_img.saveImage(sim_sar_count, max_rows_ids, 0, 1);
|
|
||||||
}
|
}
|
||||||
sim_sar_img.setNoDataValue(-9999, 1);
|
sim_sar_img.setNoDataValue(-9999, 1);
|
||||||
sim_sar_img.setNoDataValue(-9999, 2);
|
sim_sar_img.setNoDataValue(-9999, 2);
|
||||||
|
|
@ -552,15 +555,6 @@ int ReflectTable_WGS2Range(QString dem_rc_path,QString outOriSimTiffPath,QStrin
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
qDebug() << "\t resample computing.....\t";
|
|
||||||
{
|
|
||||||
int conver = 5000;
|
|
||||||
int line_invert = 4000;// 计算重叠率
|
|
||||||
|
|
||||||
ResampleGDALs(ori_sim_count_tiffPath.toUtf8().constData(), 1, GRIORA_Bilinear);
|
|
||||||
ResampleGDALs(ori_sim_count_tiffPath.toUtf8().constData(), 2, GRIORA_Bilinear);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
#include "ui_ImagePlaneAtiInterpDialog.h"
|
#include "ui_ImagePlaneAtiInterpDialog.h"
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
#include <QCheckBox>
|
||||||
#include "BaseConstVariable.h"
|
#include "BaseConstVariable.h"
|
||||||
#include "ImageNetOperator.h"
|
#include "ImageNetOperator.h"
|
||||||
|
|
||||||
|
|
@ -116,9 +117,10 @@ void ImagePlaneAtiInterpDialog::onbuttonBoxAccepted()
|
||||||
QMessageBox::warning(nullptr, u8"警告", u8"回波GPS坐标点数目不一致");
|
QMessageBox::warning(nullptr, u8"警告", u8"回波GPS坐标点数目不一致");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool checkflag= this->ui->checkBoxOverLap->isChecked();
|
||||||
|
|
||||||
|
if (checkflag || OverlapCheck(imageNet0Path, refRangeDEMPath)) { // ????DEM???
|
||||||
if (OverlapCheck(imageNet0Path, refRangeDEMPath)) { // ????DEM???
|
|
||||||
InterploateAtiByRefDEM(imageNet0Path, refRangeDEMPath, imageLLAPath,echoGPSDataPath);
|
InterploateAtiByRefDEM(imageNet0Path, refRangeDEMPath, imageLLAPath,echoGPSDataPath);
|
||||||
|
|
||||||
QMessageBox::information(nullptr, u8"提示", u8"completed!!");
|
QMessageBox::information(nullptr, u8"提示", u8"completed!!");
|
||||||
|
|
|
||||||
|
|
@ -7,15 +7,28 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>661</width>
|
<width>661</width>
|
||||||
<height>266</height>
|
<height>305</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>根据经纬度插值高程数据</string>
|
<string>根据经纬度插值高程数据</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="3" column="2">
|
<item row="1" column="0">
|
||||||
<widget class="QPushButton" name="pushButtonImageLLASelect">
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>30</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>成像网格(经纬度):</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QPushButton" name="pushButtonEchoGPSPointDataSelect">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
|
|
@ -27,6 +40,19 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_4">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>30</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>回波GPS点</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
|
|
@ -40,8 +66,8 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="1" column="2">
|
||||||
<widget class="QLineEdit" name="lineEditImageLLAPath">
|
<widget class="QPushButton" name="pushButtonImageNet0Select">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
|
|
@ -49,7 +75,7 @@
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string>选择</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
@ -66,7 +92,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0" colspan="3">
|
<item row="7" column="0" colspan="3">
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
|
|
@ -79,8 +105,8 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="3" column="1">
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLineEdit" name="lineEditImageLLAPath">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
|
|
@ -88,12 +114,22 @@
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>成像网格(经纬度):</string>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="2">
|
<item row="0" column="1">
|
||||||
<widget class="QPushButton" name="pushButtonImageNet0Select">
|
<widget class="QLineEdit" name="lineEditGPSPointsPath">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>30</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="2">
|
||||||
|
<widget class="QPushButton" name="pushButtonImageLLASelect">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
|
|
@ -144,8 +180,8 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="6" column="0">
|
||||||
<widget class="QLabel" name="label_4">
|
<widget class="QCheckBox" name="checkBoxOverLap">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
|
|
@ -153,30 +189,7 @@
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>回波GPS点</string>
|
<string>强制采样</string>
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLineEdit" name="lineEditGPSPointsPath">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>30</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="QPushButton" name="pushButtonEchoGPSPointDataSelect">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>30</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>选择</string>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
#include "InitCreateImageXYZDialog.h"
|
#include "InitCreateImageXYZDialog.h"
|
||||||
#include "ImagePlaneAtiInterpDialog.h"
|
#include "ImagePlaneAtiInterpDialog.h"
|
||||||
#include "QCreateInSARImagePlaneXYZRDialog.h"
|
#include "QCreateInSARImagePlaneXYZRDialog.h"
|
||||||
|
#include "QLookTableResampleFromWGS84ToRange.h"
|
||||||
|
|
||||||
|
|
||||||
SARSimlulationRFPCToolButton::SARSimlulationRFPCToolButton(QWidget* parent)
|
SARSimlulationRFPCToolButton::SARSimlulationRFPCToolButton(QWidget* parent)
|
||||||
|
|
@ -83,6 +84,7 @@ void RegisterPreToolBox(LAMPMainWidget::RasterMainWidget* mainwindows, ToolBoxWi
|
||||||
emit toolbox->addBoxToolItemSIGNAL(new ImagePlaneAtiInterpToolButton(toolbox));
|
emit toolbox->addBoxToolItemSIGNAL(new ImagePlaneAtiInterpToolButton(toolbox));
|
||||||
emit toolbox->addBoxToolItemSIGNAL(new QCreateInSARImagePlaneXYZRToolButton(toolbox));
|
emit toolbox->addBoxToolItemSIGNAL(new QCreateInSARImagePlaneXYZRToolButton(toolbox));
|
||||||
emit toolbox->addBoxToolItemSIGNAL(new QInSARBPImageToolButton(toolbox));
|
emit toolbox->addBoxToolItemSIGNAL(new QInSARBPImageToolButton(toolbox));
|
||||||
|
emit toolbox->addBoxToolItemSIGNAL(new QLookTableResampleFromWGS84ToRangeToolButton(toolbox));
|
||||||
}
|
}
|
||||||
|
|
||||||
LookTableComputerClassToolButton::LookTableComputerClassToolButton(QWidget* parent)
|
LookTableComputerClassToolButton::LookTableComputerClassToolButton(QWidget* parent)
|
||||||
|
|
@ -217,3 +219,20 @@ void QInSARBPImageToolButton::run()
|
||||||
QSimulationBPImage* dialog = new QSimulationBPImage;
|
QSimulationBPImage* dialog = new QSimulationBPImage;
|
||||||
dialog->show();
|
dialog->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QLookTableResampleFromWGS84ToRangeToolButton::QLookTableResampleFromWGS84ToRangeToolButton(QWidget* parent)
|
||||||
|
{
|
||||||
|
this->toolPath = QVector<QString>(0);
|
||||||
|
this->toolPath.push_back(u8"력廬묏야욋");
|
||||||
|
this->toolname = QString(u8"꿴冷깊돨럽蕨꿨令");
|
||||||
|
}
|
||||||
|
|
||||||
|
QLookTableResampleFromWGS84ToRangeToolButton::~QLookTableResampleFromWGS84ToRangeToolButton()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void QLookTableResampleFromWGS84ToRangeToolButton::run()
|
||||||
|
{
|
||||||
|
QLookTableResampleFromWGS84ToRange* dialog = new QLookTableResampleFromWGS84ToRange;
|
||||||
|
dialog->show();
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,15 @@ public:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class SIMULATIONSARTOOL_EXPORT QLookTableResampleFromWGS84ToRangeToolButton : public QToolAbstract {
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
QLookTableResampleFromWGS84ToRangeToolButton(QWidget* parent = nullptr);
|
||||||
|
~QLookTableResampleFromWGS84ToRangeToolButton();
|
||||||
|
public:
|
||||||
|
virtual void run() override;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
extern "C" SIMULATIONSARTOOL_EXPORT void RegisterPreToolBox(LAMPMainWidget::RasterMainWidget* mainwindows, ToolBoxWidget* toolbox);
|
extern "C" SIMULATIONSARTOOL_EXPORT void RegisterPreToolBox(LAMPMainWidget::RasterMainWidget* mainwindows, ToolBoxWidget* toolbox);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue