Commit 2006775e authored by Zhiping Jiang (蒋志平)'s avatar Zhiping Jiang (蒋志平) 💬

Fix mac-platform building error

parent a55e29dd
......@@ -4,9 +4,9 @@ ADD_LIBRARY(OpenCV_ARUCO SHARED ${ARUCO_SOURCES})
TARGET_LINK_LIBRARIES(OpenCV_ARUCO ${OpenCV_LIBS})
IF (WIN32)
SET(ScreenCameraInfo_Source os_dependent/ScreenCameraInfo_Win.cpp)
SET(ScreenCameraInfo_Source CoreOpenCVExtensions/os_dependent/ScreenCameraInfo_Win.cpp)
ELSEIF (APPLE)
SET(ScreenCameraInfo_Source os_dependent/ScreenCameraInfo_Mac.cpp)
SET(ScreenCameraInfo_Source CoreOpenCVExtensions/os_dependent/ScreenCameraInfo_Mac.cpp)
ENDIF ()
FILE(GLOB CoreOpenCVExtensions_SOURCES
......
......@@ -17,12 +17,11 @@
D4042D4C1E2137D9002C97B7 /* OpencvMatxExtensions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D4042D491E2137D9002C97B7 /* OpencvMatxExtensions.cpp */; };
D4042D4D1E2137D9002C97B7 /* OpencvMatxExtensions.h in Headers */ = {isa = PBXBuildFile; fileRef = D4042D4A1E2137D9002C97B7 /* OpencvMatxExtensions.h */; settings = {ATTRIBUTES = (Public, ); }; };
D4042D4E1E2137D9002C97B7 /* OpencvMatxExtensions.h in Headers */ = {isa = PBXBuildFile; fileRef = D4042D4A1E2137D9002C97B7 /* OpencvMatxExtensions.h */; settings = {ATTRIBUTES = (Public, ); }; };
D42877581E42501500AE87C7 /* ScreenCameraInfo_Mac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D42877561E42501500AE87C7 /* ScreenCameraInfo_Mac.cpp */; };
D42877591E42501500AE87C7 /* ScreenCameraInfo_Mac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D42877561E42501500AE87C7 /* ScreenCameraInfo_Mac.cpp */; };
D41B5C591E4A1737008EB5E9 /* ScreenCameraInfo_Mac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D41B5C571E4A1737008EB5E9 /* ScreenCameraInfo_Mac.cpp */; };
D41B5C5A1E4A1737008EB5E9 /* ScreenCameraInfo_Mac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D41B5C571E4A1737008EB5E9 /* ScreenCameraInfo_Mac.cpp */; };
D41B5C5B1E4A1737008EB5E9 /* ScreenCameraInfo_Win.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D41B5C581E4A1737008EB5E9 /* ScreenCameraInfo_Win.cpp */; };
D428775A1E42501500AE87C7 /* ScreenCameraInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = D42877571E42501500AE87C7 /* ScreenCameraInfo.h */; };
D428775B1E42501500AE87C7 /* ScreenCameraInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = D42877571E42501500AE87C7 /* ScreenCameraInfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
D428775D1E43827200AE87C7 /* ScreenCameraInfo_Win.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D428775C1E43827200AE87C7 /* ScreenCameraInfo_Win.cpp */; };
D428775E1E43827200AE87C7 /* ScreenCameraInfo_Win.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D428775C1E43827200AE87C7 /* ScreenCameraInfo_Win.cpp */; };
D42877601E43865E00AE87C7 /* ScreenCameraInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D428775F1E43865E00AE87C7 /* ScreenCameraInfo.cpp */; };
D42877611E43865E00AE87C7 /* ScreenCameraInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D428775F1E43865E00AE87C7 /* ScreenCameraInfo.cpp */; };
D4316DDD1E2E7FB100B3CC01 /* MatxGeometry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D4316DDB1E2E7FB100B3CC01 /* MatxGeometry.cpp */; };
......@@ -63,7 +62,7 @@
D482005E1E48622400ACF303 /* ArucoMarkerLocator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D482005C1E48622400ACF303 /* ArucoMarkerLocator.cpp */; };
D482005F1E48622400ACF303 /* ArucoMarkerLocator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D482005C1E48622400ACF303 /* ArucoMarkerLocator.cpp */; };
D48200601E48622400ACF303 /* ArucoMarkerLocator.h in Headers */ = {isa = PBXBuildFile; fileRef = D482005D1E48622400ACF303 /* ArucoMarkerLocator.h */; };
D48200611E48622400ACF303 /* ArucoMarkerLocator.h in Headers */ = {isa = PBXBuildFile; fileRef = D482005D1E48622400ACF303 /* ArucoMarkerLocator.h */; };
D48200611E48622400ACF303 /* ArucoMarkerLocator.h in Headers */ = {isa = PBXBuildFile; fileRef = D482005D1E48622400ACF303 /* ArucoMarkerLocator.h */; settings = {ATTRIBUTES = (Public, ); }; };
D4A78C011E3EFFF600DAA3D8 /* OpenCL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D474136F1D9CFE3E002C99E7 /* OpenCL.framework */; };
D4A78C051E3F3CA100DAA3D8 /* TickTockTimer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D4A78C031E3F3CA100DAA3D8 /* TickTockTimer.cpp */; };
D4A78C061E3F3CA100DAA3D8 /* TickTockTimer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D4A78C031E3F3CA100DAA3D8 /* TickTockTimer.cpp */; };
......@@ -112,9 +111,9 @@
64EED18C1E44590A00DA99CE /* jzplib_geom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jzplib_geom.h; sourceTree = "<group>"; };
D4042D491E2137D9002C97B7 /* OpencvMatxExtensions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OpencvMatxExtensions.cpp; sourceTree = "<group>"; };
D4042D4A1E2137D9002C97B7 /* OpencvMatxExtensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OpencvMatxExtensions.h; sourceTree = "<group>"; };
D42877561E42501500AE87C7 /* ScreenCameraInfo_Mac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScreenCameraInfo_Mac.cpp; sourceTree = "<group>"; };
D41B5C571E4A1737008EB5E9 /* ScreenCameraInfo_Mac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ScreenCameraInfo_Mac.cpp; path = os_dependent/ScreenCameraInfo_Mac.cpp; sourceTree = "<group>"; };
D41B5C581E4A1737008EB5E9 /* ScreenCameraInfo_Win.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ScreenCameraInfo_Win.cpp; path = os_dependent/ScreenCameraInfo_Win.cpp; sourceTree = "<group>"; };
D42877571E42501500AE87C7 /* ScreenCameraInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScreenCameraInfo.h; sourceTree = "<group>"; };
D428775C1E43827200AE87C7 /* ScreenCameraInfo_Win.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScreenCameraInfo_Win.cpp; sourceTree = "<group>"; };
D428775F1E43865E00AE87C7 /* ScreenCameraInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScreenCameraInfo.cpp; sourceTree = "<group>"; };
D4316DDB1E2E7FB100B3CC01 /* MatxGeometry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MatxGeometry.cpp; sourceTree = "<group>"; };
D4316DDC1E2E7FB100B3CC01 /* MatxGeometry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MatxGeometry.h; sourceTree = "<group>"; };
......@@ -277,8 +276,8 @@
D462424E1E4101A600224A82 /* Singleton.h */,
D42877571E42501500AE87C7 /* ScreenCameraInfo.h */,
D428775F1E43865E00AE87C7 /* ScreenCameraInfo.cpp */,
D42877561E42501500AE87C7 /* ScreenCameraInfo_Mac.cpp */,
D428775C1E43827200AE87C7 /* ScreenCameraInfo_Win.cpp */,
D41B5C571E4A1737008EB5E9 /* ScreenCameraInfo_Mac.cpp */,
D41B5C581E4A1737008EB5E9 /* ScreenCameraInfo_Win.cpp */,
);
name = GeneralUtilities;
sourceTree = "<group>";
......@@ -375,11 +374,11 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
D4B042AD1DC050ED003808DA /* OpenCV_ARUCO.h in Headers */,
D4B042B01DC05752003808DA /* aruco.hpp in Headers */,
D4B042C31DC05769003808DA /* precomp.hpp in Headers */,
D4B042B61DC0575E003808DA /* dictionary.hpp in Headers */,
D48200611E48622400ACF303 /* ArucoMarkerLocator.h in Headers */,
D4B042AD1DC050ED003808DA /* OpenCV_ARUCO.h in Headers */,
D4B042C51DC05769003808DA /* predefined_dictionaries.hpp in Headers */,
D4B042B41DC0575E003808DA /* charuco.hpp in Headers */,
);
......@@ -578,7 +577,7 @@
files = (
D453AE461E1ABBB600749700 /* jzplib_analysis.cpp in Sources */,
D47413841D9D021A002C99E7 /* jzplib_camera.cpp in Sources */,
D42877581E42501500AE87C7 /* ScreenCameraInfo_Mac.cpp in Sources */,
D41B5C591E4A1737008EB5E9 /* ScreenCameraInfo_Mac.cpp in Sources */,
D4042D4B1E2137D9002C97B7 /* OpencvMatxExtensions.cpp in Sources */,
D474135B1D9CF06B002C99E7 /* jzplib_draw.cpp in Sources */,
D464A4DA1E14A2F200767840 /* jzplib_image.cpp in Sources */,
......@@ -588,7 +587,7 @@
D47899FD1E167269008AB9E0 /* jzplib_core.cpp in Sources */,
D4A78C051E3F3CA100DAA3D8 /* TickTockTimer.cpp in Sources */,
D4316DDD1E2E7FB100B3CC01 /* MatxGeometry.cpp in Sources */,
D428775D1E43827200AE87C7 /* ScreenCameraInfo_Win.cpp in Sources */,
D41B5C5B1E4A1737008EB5E9 /* ScreenCameraInfo_Win.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -598,7 +597,7 @@
files = (
D4A78C091E3F54F200DAA3D8 /* jzplib_analysis.cpp in Sources */,
D47413851D9D021A002C99E7 /* jzplib_camera.cpp in Sources */,
D42877591E42501500AE87C7 /* ScreenCameraInfo_Mac.cpp in Sources */,
D41B5C5A1E4A1737008EB5E9 /* ScreenCameraInfo_Mac.cpp in Sources */,
D4042D4C1E2137D9002C97B7 /* OpencvMatxExtensions.cpp in Sources */,
D474135C1D9CF06B002C99E7 /* jzplib_draw.cpp in Sources */,
D464A4DB1E14A2F200767840 /* jzplib_image.cpp in Sources */,
......@@ -608,7 +607,6 @@
D47899FE1E167269008AB9E0 /* jzplib_core.cpp in Sources */,
D4A78C061E3F3CA100DAA3D8 /* TickTockTimer.cpp in Sources */,
D4316DDE1E2E7FB100B3CC01 /* MatxGeometry.cpp in Sources */,
D428775E1E43827200AE87C7 /* ScreenCameraInfo_Win.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......
......@@ -34,6 +34,8 @@ std::string crossPlatform_exec(const char* cmd) {
ScreenCameraInfo ScreenCameraInfo::getCurrentDiviceInfo() {
// Quanqing, come on! Fill this part!
std::string currentDeviceCode = ScreenCameraInfo::currentDeviceCode();
std::string deviceCode;
std::string productName;
cv::Size2i screenPhysicalResolution;
......
......@@ -34,13 +34,13 @@ public:
double cameraSymmetricXFov();
double cameraSymmetricYFov();
static std::string currentDeviceCode();
static ScreenCameraInfo getCurrentDiviceInfo();
private:
ScreenCameraInfo();
ScreenCameraInfo(const std::string & deviceCode, const std::string & productName, const cv::Size2i & screenPhysicalResolution, double screenPhysicalPPI, const cv::Point2d & equavalentPixelPointForFrontCamera, const cv::Size2i & frontCameraResolution, const cv::Point2i & principalPoint, double focalLength): deviceCode{deviceCode}, productName{productName}, screenPhysicalResolution{screenPhysicalResolution}, screenPhysicalPPI{screenPhysicalPPI}, equavalentPixelPointForFrontCamera{equavalentPixelPointForFrontCamera}, frontCameraResolution{frontCameraResolution}, principalPoint{principalPoint}, focalLength{focalLength} {}
std::string currentDeviceCode();
};
#endif /* ScreenCameraInfo_hpp */
......@@ -6,7 +6,7 @@
// Copyright © 2017年 JiangZhping. All rights reserved.
//
#include "ScreenCameraInfo.h"
#include "../ScreenCameraInfo.h"
#include <sys/utsname.h>
#include <sys/sysctl.h>
......
......@@ -2,7 +2,7 @@
#ifndef ArucoMarkerLocator_h
#define ArucoMarkerLocator_h
#include "../CoreOpenCVExtensions/CoreOpenCVExtensions.h"
#include <CoreOpenCVExtensions/CoreOpenCVExtensions.h>
#include "aruco.hpp"
using namespace std;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment