Undistort DJI Phantom 4 RTK Изображение от Exif (xmp) Data - PullRequest
0 голосов
/ 28 ноября 2018

Что означает значение DewarpData в информации XMP фотографии Phantom 4 RTK в информации камеры (внутренняя камера)?

drone-dji: DewarpData = "2018-03-13; 3659.780000000000,3653.170000000000, -7.710000000000,45.900000000000, -0.269478000000,0.115681000000, -0.000087561900, -0.000306177000, -0.035762800000 "
* 100 * * * * * * * * *.Веб-страница продукта Phantom 4 RTK

Disable the distortion correction would have Phantom 4 RTK’s camera capture the unedited image with the fisheye effect.
The lens distortion parameters were all pre-measured.
These parameters would all be saved in “DewarpData” under the XMP field for every image taken.
You can also input these parameters manually to calibrate the image distortion with the third-party software.

Я думаю, что возможно использовать это значение для исправления искажения, но какова формула расчета?
Это значение, которое можетиспользоваться для преобразования изображения ImageMagick баррель или OpenCV initUndistortRectifyMap ?

это фото
https://drive.google.com/file/d/1C0gyXr7HQUsEx5WRLmiqex9M-rIu2SSI/view?usp=sharing

часть данных xmpэто фото

drone-dji: AbsoluteAltitude = "+116.56"
drone-dji: RelativeAltitude = "+69.95"
drone-dji: GpsLatitude = "43.36511377"
drone-dji: GpsLongtitude = "141.81345593"
drone-dji: GimbalRollDegree = "+0.00"
drone-dji: GimbalYawDegree = "-79.00"
drone-dji: GimbalPitchDegree = "-89.90"
drone-dji: FlightRollDegree = "-2.50"
drone-dji: FlightYawDegree = "-78.60"
drone-dji: FlightPitchDegree = "-4.50"
drone-dji: FlightXSpeed = "+0.50"
drone-dji: FlightYSpeed = "-2.90"
drone-dji: FlightZSpeed = "+0.00"
drone-dji: CamReverse = "0"
drone-dji: GimbalReverse = "0"
drone-dji: SelfData = "Undefined"
drone-dji: CalibratedFocalLength = "3666.666504"
drone-dji: CalibratedOpticalCenterX = "2432.000000"
drone-dji: CalibratedOpticalCenterY = "1824.000000"
drone-dji: RtkFlag = "50"
drone-dji: RtkStdLon = "0.01274"
drone-dji: RtkStdLat = "0.01122"
drone-dji: RtkStdHgt = "0.02394"
drone-dji: DewarpData = " 2018-03-13;3659.780000000000,3653.170000000000,-7.710000000000,45.900000000000,-0.269478000000,0.115681000000,-0.000087561900,-0.000306177000,-0.035762800000"
drone-dji: DewarpFlag = "0"

tiff:Orientation = "1"
tiff:XResolution = "72/1"
tiff:YResolution = "72/1"
tiff:ResolutionUnit = "2"
tiff:YCbCrPositioning = "1"
tiff:Make = "DJI"
tiff:Model = "FC6310R"

exif:ColorSpace = "1"
exif:CompressedBitsPerPixel = "7581493/2217984"
exif:PixelXDimension = "4864"
exif:PixelYDimension = "3648"
exif:ExposureTime = "1562/1000000"
exif:FNumber = "400/100"
exif:ExposureProgram = "4"
exif:ShutterSpeedValue = "-9312/-1000"
exif:ApertureValue = "400/100"
exif:ExposureBiasValue = "0/32"
exif:MaxApertureValue = "297/100"
exif:SubjectDistance = "0/100"
exif:MeteringMode = "2"
exif:LightSource = "1"
exif:FocalLength = "880/100"
exif:ExposureIndex = "0/0"
exif:CustomRendered = "0"
exif:ExposureMode = "0"
exif:WhiteBalance = "1"
exif:DigitalZoomRatio = "0/0"
exif:FocalLengthIn35mmFilm = "24"
exif:SceneCaptureType = "0"
exif:GainControl = "0"
exif:Contrast = "0"
exif:Saturation = "0"
exif:Sharpness = "0"
exif:SubjectDistanceRange = "0"
exif:GPSAltitudeRef = "0"
exif:GPSAltitude = "116560/1000"
exif:DateTimeOriginal = "2018-10-19T12:02:34"
exif:ISOSpeedRatings  (0x600 : isOrdered isArray)
   [1] = "100"
exif:ExifVersion = "0230"
exif:FlashpixVersion = "0010"
exif:ComponentsConfiguration  (0x600 : isOrdered isArray)
   [1] = "0"
   [2] = "3"
   [3] = "2"
   [4] = "1"
exif:Flash  (0x100 : isStruct)
   exif:Fired = "False"
   exif:Return = "0"
   exif:Mode = "0"
   exif:Function = "True"
   exif:RedEyeMode = "False"
exif:FileSource = "3"
exif:SceneType = "1"
exif:GPSVersionID = "2.3.0.0"
exif:GPSLatitude = "43,21.9068N"
exif:GPSLongitude = "141,48.8074E"




---------- ответ ----------
Вроде какэто значение.
Дата и время, fx, fy, cx, cy, k1, k2, p1, p2, k3

ex)

cv::Mat src = cv::imread(filePath);
cv::Mat distCoeff;
distCoeff = cv::Mat::zeros(5, 1, CV_64FC1);

distCoeff.at<double>(0, 0) = -0.269478;// k1
distCoeff.at<double>(1, 0) = 0.115681;// k2
distCoeff.at<double>(2, 0) = -0.0000875619;// p1
distCoeff.at<double>(3, 0) = -0.0003061770;// p2
distCoeff.at<double>(4, 0) = -0.0357628000;// k3

cv::Mat cam1;
cam1 = cv::Mat::zeros(3, 3, CV_32FC1);
cam1.at<float>(0, 2) = 2432 - 7.71; // cX (4864x3648 Width / 2)
cam1.at<float>(1, 2) = 1824 + 5.90; // cY (4864x3648 Height / 2)
cam1.at<float>(0, 0) = 3659.78;// fx
cam1.at<float>(1, 1) = 3653.17;// fy
cam1.at<float>(2, 2) = 1;

cv::Mat dst, map1, map2;
cv::initUndistortRectifyMap(cam1, distCoeff, cv::Mat(), cam1, src.size(), CV_32FC1, map1, map2);
cv::remap(src, dst, map1, map2, cv::INTER_LINEAR);
...