检查成像问题

pull/3/head
陈增辉 2024-12-28 15:25:56 +08:00
parent a7d2ed7996
commit dce9400f1c
3 changed files with 14 additions and 13 deletions

View File

@ -16,7 +16,7 @@
//#define __PRFDEBUG__
#define __TBPIMAGE__
//#include <mkl.h>
#include <complex>

View File

@ -37,7 +37,8 @@ __global__ void CUDA_TBPImage(
float factorj = freq * 4 * PI / LIGHTSPEED;
cuComplex Rfactorj = make_cuComplex(0, factorj * R);
cuComplex Rphi =cuCexpf(Rfactorj);// 校正项
imgArr[idx] = cuCaddf(imgArr[idx], cuCmulf(echoArr[Rid] , Rphi));// ½ÃÕý
cuComplex echotime = echoArr[prfid * freqcount + Rid];
imgArr[idx] = cuCaddf(imgArr[idx], cuCmulf(echotime, Rphi));// ½ÃÕý
//printf("R=%f;Rid=%d;factorj=%f;Rfactorj=complex(%f,%f);Rphi=complex(%f,%f);\n", R, Rid, factorj,
// Rfactorj.x, Rfactorj.y,
// Rphi.x, Rphi.y);
@ -60,13 +61,13 @@ extern "C" void CUDATBPImage(float* antPx, float* antPy, float* antPz,
// 调用 CUDA 核函数 CUDA_RTPC_Kernel
CUDA_TBPImage << <numBlocks, blockSize >> > (
antPx, antPy, antPz,
imgx, imgy, imgz,
R,
echoArr, imgArr,
freq, fs, Rnear, Rfar,
rowcount, colcount,
prfid, freqcount
antPx, antPy, antPz,
imgx, imgy, imgz,
R,
echoArr, imgArr,
freq, fs, Rnear, Rfar,
rowcount, colcount,
prfid, freqcount
);

View File

@ -280,8 +280,6 @@ ErrorCode TBPImageAlgCls::ProcessGPU()
tempimgBlockline, colCount,
tempechoBlockline, PlusePoints );
}
this->L1ds->saveImageRaster(imgArr, startimgrowid, tempimgBlockline);
}
@ -393,12 +391,14 @@ void TBPImageGPUAlg(std::shared_ptr<float> antPx, std::shared_ptr<float> antPy,
// Device -> Host
DeviceToHost(h_imgArr, d_imgArr, sizeof(cuComplex) * rowcount * colcount);
DeviceToHost(h_R,d_R,sizeof(float)*rowcount*colcount);
for (long i = 0; i < rowcount; i++) {
for (long j = 0; j < colcount; j++) {
imgArr.get()[i * colcount + j] = imgArr.get()[i * colcount + j]+ std::complex<float>(h_imgArr[i * colcount + j].x,
h_imgArr[i * colcount + j].y);
imgArr.get()[i * colcount + j] = std::complex<float>(h_imgArr[i * colcount + j].x,h_imgArr[i * colcount + j].y);
}
}