Insta360Develop / CameraSDK-Cpp

CameraSDK-Cpp is a C++ library to control Insta360 cameras.
https://www.insta360.com
115 stars 16 forks source link

Fish eye panoramic correction tiled #30

Open LoveMYChen opened 1 year ago

LoveMYChen commented 1 year ago

May I ask if there is a tiled code for fish eye panoramic correction?

ricardosutana commented 1 year ago

https://docs.opencv.org/3.4/db/d58/group__calib3d__fisheye.html

LoveMYChen commented 1 year ago

May I ask which functions are needed to perform tiled panoramic stitching on the camera's insp double fish eye file?

ricardosutana commented 1 year ago

Dis you take a look on media sdk? This sdk is just to control the camera.

LoveMYChen commented 1 year ago

Sorry, when I was compiling the media sdk library, I was prompted that the libmnn.so and libxcore.so libraries were missing. Can you tell me where to find them?

ricardosutana commented 1 year ago

libmnn.so is on sdk lib folder libxcore I BELIVE that is installed together with cuda.

I compiled using cmakelist

issue solved?

LoveMYChen commented 1 year ago

Sorry, I'm a novice and I don't know how to solve this problem. CMakeFiles/stickerSDMDemo.dir/src/main.cc.o: In function 'main': Main. cc: (. text+0x216): 'main' is defined multiple times CMakeFiles/stickerSDMDemo. dir/CMakeFiles/3.22.1/CompilerIdCXX/CMakeCXXCompilerId. cpp. o: CMakeCXXCompilerId. cpp: (. text+0x0): First defined here collect2: error: ld returned 1 exit status CMakeFiles/stitcherSDKDemo.dir/build.make:112: recipe for target 'stitcherSDKDemo' failed make[2]: [stitcherSDKDemo] Error 1 CMakeFiles/Makefile2:82: recipe for target 'CMakeFiles/stitcherSDKDemo.dir/all' failed make[1]: [CMakeFiles/stitcherSDKDemo.dir/all] Error 2 Makefile:90: recipe for target 'all' failed make: *** [all] Error 2 Can you help me?

ricardosutana commented 1 year ago

I'm usin CLion IDE to run my code. I strongly reccomend you to use it. I will share my cmakelist.txt with you.

cmake_minimum_required(VERSION 3.25) project(insta360)


set(CMAKE_CXX_STANDARD 11)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
find_package( OpenCV REQUIRED )
include_directories( ${OpenCV_INCLUDE_DIRS} )
include_directories("/home/ricardo/insta360/include/")#camera sdk includes
include_directories("/usr/include/")#user includes

add_executable(${PROJECT_NAME} main.cpp)
#put all .so libraries that you will need here
target_link_libraries(${PROJECT_NAME} "/home/ricardo/insta360/lib/libCameraSDK.so")#all .so files that 
target_link_libraries(${PROJECT_NAME} "/usr/lib/x86_64-linux-gnu/libudev.so")
target_link_libraries(${PROJECT_NAME} "/usr/lib/x86_64-linux-gnu/libudev.so.1")
target_link_libraries(${PROJECT_NAME} "/usr/lib/x86_64-linux-gnu/libudev.so.1.6.17")

target_link_libraries( ${PROJECT_NAME} ${OpenCV_LIBS} )
LoveMYChen commented 1 year ago

Thank you for your help in successfully compiling. Once again, may I ask if there is a statement in the MediaSDK that converts the insp file of a binocular fisheye photo into a tiled panoramic view? I cannot find it.

LoveMYChen commented 1 year ago

Oh, sorry, this should be a change in the format of the panoramic projection, right? Is this reflected in the SDK?

ricardosutana commented 1 year ago

I dont know if I understood what you need , but a tiled image is process of stitching. Take a time to read the documentation of camera sdk parameter and also the media sdk parameter

LoveMYChen commented 1 year ago

Okay, I just want to use code to tile the photo from fisheye mode, but I haven't found the relevant code yet.

Tianweihaihaihai commented 1 year ago

the document of media sdk is enough dear