Skip to content

Commit

Permalink
removed xfeatures (arm compat)
Browse files Browse the repository at this point in the history
  • Loading branch information
aszabo314 committed Apr 15, 2022
1 parent 5a0e260 commit c5b197d
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 25 deletions.
2 changes: 1 addition & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### 1.1.9
* Added SURF, SIFT etc.
* added SolvePnPRansac & Refine
* added SolvePnPRansac & Refine

### 1.1.8
* updated Aardvark.Base to 5.2
Expand Down
2 changes: 1 addition & 1 deletion buildnative.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ cmd /C ".vcpkg\vcpkg\bootstrap-vcpkg.bat -disableMetrics"


SET VCPKG_NUGET_REPOSITORY=https://github.com/aardvark-community/MiniCV
.vcpkg\vcpkg\vcpkg.exe install OpenCV[contrib] --triplet x64-windows-static-md-rel --binarysource="clear;nuget,Github,readwrite;nugettimeout,1000"
.vcpkg\vcpkg\vcpkg.exe install OpenCV --triplet x64-windows-static-md-rel --binarysource="clear;nuget,Github,readwrite;nugettimeout,1000"

cmake -S src\MiniCVNative -B src\MiniCVNative\build -DCMAKE_TOOLCHAIN_FILE="%~dp0\.vcpkg\vcpkg\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static-md-rel -DCMAKE_BUILD_TYPE=Release
cmake --build src\MiniCVNative\build --config Release --target install
2 changes: 1 addition & 1 deletion buildnative.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ fi
./.vcpkg/vcpkg/bootstrap-vcpkg.sh

export VCPKG_NUGET_REPOSITORY="https://github.com/aardvark-community/MiniCV"
./.vcpkg/vcpkg/vcpkg install OpenCV[contrib] --triplet $VCPKG_TRIPLET --binarysource='clear;nuget,GitHub,readwrite;nugettimeout,1000'
./.vcpkg/vcpkg/vcpkg install OpenCV --triplet $VCPKG_TRIPLET --binarysource='clear;nuget,GitHub,readwrite;nugettimeout,1000'

rm -dfr src/MiniCVNative/build
cmake -S src/MiniCVNative/ -B src/MiniCVNative/build $ARCH_FLAGS \
Expand Down
2 changes: 1 addition & 1 deletion buildnativelocal.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ cmd /C ".vcpkg\vcpkg\bootstrap-vcpkg.bat -disableMetrics"


REM SET VCPKG_NUGET_REPOSITORY=https://github.com/aardvark-community/MiniCV
.vcpkg\vcpkg\vcpkg.exe install OpenCV[contrib] --triplet x64-windows-static-md-rel
.vcpkg\vcpkg\vcpkg.exe install OpenCV --triplet x64-windows-static-md-rel
REM --binarysource="clear;nuget,Github,readwrite;nugettimeout,1000"

cmake -S src\MiniCVNative -B src\MiniCVNative\build -DCMAKE_TOOLCHAIN_FILE="%~dp0\.vcpkg\vcpkg\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static-md-rel -DCMAKE_BUILD_TYPE=Release
Expand Down
6 changes: 0 additions & 6 deletions src/MiniCV/OpenCV.fs
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,6 @@ module OpenCV =
| Orb = 2
| Brisk = 3
| Sift = 4
| Surf = 5
| Msd = 6
| Vgg = 7



Expand Down Expand Up @@ -331,9 +328,6 @@ module OpenCV =
gc.Free()

let detectFeatures (mode : DetectorMode) (img : PixImage<byte>) =
match mode with
| DetectorMode.Surf -> failwith "SURF not implemented (float descriptors)"
| _ -> ()
let img = img.ToCanonicalDenseLayout() |> unbox<PixImage<byte>>

let gc = GCHandle.Alloc(img.Volume.Data, GCHandleType.Pinned)
Expand Down
2 changes: 1 addition & 1 deletion src/MiniCVNative/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ endif()
add_library(MiniCVNative SHARED MiniCVNative.h MiniCVNative.cpp ap3p.h ap3p.cpp aruco_nano.h fivepoint.h fivepoint.cpp)

# include_directories(~/vcpkg/packages/ceres_arm64-osx/include)
target_link_libraries(MiniCVNative PRIVATE opencv_ml libprotobuf opencv_core opencv_videoio opencv_calib3d opencv_features2d opencv_objdetect opencv_xfeatures2d)
target_link_libraries(MiniCVNative PRIVATE opencv_ml libprotobuf opencv_core opencv_videoio opencv_calib3d opencv_features2d opencv_objdetect)

SET(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/../../libs/Native/MiniCV/")
install(TARGETS MiniCVNative DESTINATION ${OS}/${ARCH})
9 changes: 0 additions & 9 deletions src/MiniCVNative/MiniCVNative.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,15 +258,6 @@ DllExport(DetectorResult*) cvDetectFeatures(char* data, int width, int height, i
case FEATURE_MODE_SIFT:
detector = cv::SIFT::create();
break;
case FEATURE_MODE_SURF:
detector = xfeatures2d::SURF::create();
break;
case FEATURE_MODE_MSD:
detector = xfeatures2d::MSDDetector::create();
break;
case FEATURE_MODE_VGG:
detector = xfeatures2d::VGG::create();
break;
default:
return nullptr;
}
Expand Down
6 changes: 1 addition & 5 deletions src/MiniCVNative/MiniCVNative.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "fivepoint.h"
#include "ap3p.h"
#include "aruco_nano.h"
#include <opencv2/xfeatures2d.hpp>

typedef struct KeyPoint2d_ {
cv::Point2f pt;
Expand Down Expand Up @@ -45,7 +44,4 @@ typedef struct ArucoMarkerInfo_ {
#define FEATURE_MODE_AKAZE 1
#define FEATURE_MODE_ORB 2
#define FEATURE_MODE_BRISK 3
#define FEATURE_MODE_SIFT 4
#define FEATURE_MODE_SURF 5
#define FEATURE_MODE_MSD 6
#define FEATURE_MODE_VGG 7
#define FEATURE_MODE_SIFT 4

0 comments on commit c5b197d

Please sign in to comment.