coordinate frames transformation
This commit is contained in:
@@ -38,13 +38,13 @@ func CameraDirectionVec(u, v float64) []float64 {
|
||||
// fmt.Printf("Diagonal (calculated from FOV): %.6f mm\n", dCalcOfFOV)
|
||||
|
||||
directionVec := []float64{0, 0, 0}
|
||||
directionVec[0] = 0 // x方向, mm,线性CCD每次单行成像
|
||||
directionVec[1] = (v - PANPixels/2) * PANCellSize / 1000.0 // y方向, mm
|
||||
directionVec[2] = -FocalLength // z方向, mm
|
||||
directionVec[0] = 0 // x方向, mm,线性CCD每次单行成像
|
||||
directionVec[1] = (v - PANPixels/2) * PANCellSize / 1000.0 / 1000.0 // y方向, mm
|
||||
directionVec[2] = -FocalLength / 1000.0 // z方向, mm
|
||||
|
||||
// 归一化
|
||||
// fmt.Printf("Direction Vector: (%.6f, %.6f, %.6f) \n", directionVec[0], directionVec[1], directionVec[2])
|
||||
directionVec = normalizeVec(directionVec)
|
||||
// directionVec = normalizeVec(directionVec)
|
||||
// fmt.Printf("Direction Vector (normalized): (%.6f, %.6f, %.6f) \n", directionVec[0], directionVec[1], directionVec[2])
|
||||
|
||||
return directionVec
|
||||
|
||||
Reference in New Issue
Block a user