Convert the camera parameters into SV format
Bug: 156101189
Test: Used ffmpeg to simulate 4 cameras and then manually launched SV
service and app on Osprey
Change-Id: I416125eb272735de4550f0a9d9f770411fc553a3
diff --git a/surround_view/service-impl/CameraUtils.h b/surround_view/service-impl/CameraUtils.h
index a7a35de..1fbc8d4 100644
--- a/surround_view/service-impl/CameraUtils.h
+++ b/surround_view/service-impl/CameraUtils.h
@@ -22,7 +22,10 @@
#include <string>
#include <vector>
+#include "core_lib.h"
+
using ::android::hardware::automotive::evs::V1_1::IEvsCamera;
+using ::android_auto::surround_view::SurroundViewCameraParams;
namespace android {
namespace hardware {
@@ -51,9 +54,15 @@
// Gets the intrinsic/extrinsic parameters for the given physical camera id.
// Returns true if the parameters are obtained successfully. Returns false
// otherwise.
-bool getAndroidCameraParams(android::sp<IEvsCamera> camera, std::string cameraId,
+bool getAndroidCameraParams(android::sp<IEvsCamera> camera,
+ const std::string& cameraId,
AndroidCameraParams& params);
+// Converts the camera parameters from Android Camera format into Surround View
+// core lib format.
+std::vector<SurroundViewCameraParams> convertToSurroundViewCameraParams(
+ const std::map<std::string, AndroidCameraParams>& androidCameraParamsMap);
+
} // namespace implementation
} // namespace V1_0
} // namespace sv