mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 02:32:36 +01:00
Add HAVE_OPENCV preprocessor flag
This commit is contained in:
parent
72dc5b3489
commit
f16dfd8ca2
3
3rdparty/CMakeLists.txt
vendored
3
3rdparty/CMakeLists.txt
vendored
@ -343,6 +343,9 @@ add_subdirectory(miniupnp EXCLUDE_FROM_ALL)
|
|||||||
# RTMIDI
|
# RTMIDI
|
||||||
add_subdirectory(rtmidi EXCLUDE_FROM_ALL)
|
add_subdirectory(rtmidi EXCLUDE_FROM_ALL)
|
||||||
|
|
||||||
|
# OPENCV
|
||||||
|
# TODO: add library and -DHAVE_OPENCV
|
||||||
|
|
||||||
# add nice ALIAS targets for ease of use
|
# add nice ALIAS targets for ease of use
|
||||||
if(USE_SYSTEM_LIBUSB)
|
if(USE_SYSTEM_LIBUSB)
|
||||||
add_library(3rdparty::libusb ALIAS usb-1.0-shared)
|
add_library(3rdparty::libusb ALIAS usb-1.0-shared)
|
||||||
|
@ -5,7 +5,9 @@
|
|||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
|
#ifdef HAVE_OPENCV
|
||||||
#include <opencv2/photo.hpp>
|
#include <opencv2/photo.hpp>
|
||||||
|
#endif
|
||||||
|
|
||||||
LOG_CHANNEL(ps_move);
|
LOG_CHANNEL(ps_move);
|
||||||
|
|
||||||
@ -277,6 +279,7 @@ void ps_move_tracker<DiagnosticsEnabled>::process_hues()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_OPENCV
|
||||||
static bool is_circular_contour(const std::vector<cv::Point>& contour, float& area)
|
static bool is_circular_contour(const std::vector<cv::Point>& contour, float& area)
|
||||||
{
|
{
|
||||||
std::vector<cv::Point> approx;
|
std::vector<cv::Point> approx;
|
||||||
@ -457,6 +460,22 @@ void ps_move_tracker<DiagnosticsEnabled>::process_contours(ps_move_info& info, u
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
template <bool DiagnosticsEnabled>
|
||||||
|
void ps_move_tracker<DiagnosticsEnabled>::process_contours(ps_move_info& info, u32 index)
|
||||||
|
{
|
||||||
|
ensure(index < m_config.size());
|
||||||
|
|
||||||
|
const u32 width = m_width;
|
||||||
|
const u32 height = m_height;
|
||||||
|
|
||||||
|
info.valid = false;
|
||||||
|
info.x_max = width;
|
||||||
|
info.y_max = height;
|
||||||
|
|
||||||
|
ps_move.error("The tracker is not implemented for this operating system.");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
template <bool DiagnosticsEnabled>
|
template <bool DiagnosticsEnabled>
|
||||||
std::tuple<u8, u8, u8> ps_move_tracker<DiagnosticsEnabled>::hsv_to_rgb(u16 hue, float saturation, float value)
|
std::tuple<u8, u8, u8> ps_move_tracker<DiagnosticsEnabled>::hsv_to_rgb(u16 hue, float saturation, float value)
|
||||||
|
@ -79,7 +79,7 @@
|
|||||||
<DisableSpecificWarnings>4577;4467;4281;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
<DisableSpecificWarnings>4577;4467;4281;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>MaxSpeed</Optimization>
|
||||||
<PreprocessorDefinitions>_WINDOWS;UNICODE;WIN32;WIN64;WIN32_LEAN_AND_MEAN;HAVE_VULKAN;MINIUPNP_STATICLIB;ZLIB_CONST;AL_LIBTYPE_STATIC;HAVE_SDL2;WITH_DISCORD_RPC;QT_NO_DEBUG;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;NDEBUG;QT_WINEXTRAS_LIB;QT_CONCURRENT_LIB;QT_MULTIMEDIA_LIB;QT_MULTIMEDIAWIDGETS_LIB;QT_SVG_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WINDOWS;UNICODE;WIN32;WIN64;WIN32_LEAN_AND_MEAN;HAVE_VULKAN;HAVE_OPENCV;MINIUPNP_STATICLIB;ZLIB_CONST;AL_LIBTYPE_STATIC;HAVE_SDL2;WITH_DISCORD_RPC;QT_NO_DEBUG;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;NDEBUG;QT_WINEXTRAS_LIB;QT_CONCURRENT_LIB;QT_MULTIMEDIA_LIB;QT_MULTIMEDIAWIDGETS_LIB;QT_SVG_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<PreprocessToFile>false</PreprocessToFile>
|
<PreprocessToFile>false</PreprocessToFile>
|
||||||
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
@ -132,7 +132,7 @@
|
|||||||
<DisableSpecificWarnings>4577;4467;4281;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
<DisableSpecificWarnings>4577;4467;4281;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WINDOWS;UNICODE;WIN32;WIN64;WIN32_LEAN_AND_MEAN;HAVE_VULKAN;MINIUPNP_STATICLIB;ZLIB_CONST;AL_LIBTYPE_STATIC;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;QT_WINEXTRAS_LIB;QT_CONCURRENT_LIB;QT_MULTIMEDIA_LIB;QT_MULTIMEDIAWIDGETS_LIB;QT_SVG_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WINDOWS;UNICODE;WIN32;WIN64;WIN32_LEAN_AND_MEAN;HAVE_VULKAN;HAVE_OPENCV;MINIUPNP_STATICLIB;ZLIB_CONST;AL_LIBTYPE_STATIC;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;QT_WINEXTRAS_LIB;QT_CONCURRENT_LIB;QT_MULTIMEDIA_LIB;QT_MULTIMEDIAWIDGETS_LIB;QT_SVG_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<PreprocessToFile>false</PreprocessToFile>
|
<PreprocessToFile>false</PreprocessToFile>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
Loading…
Reference in New Issue
Block a user