Merge branch 'master' of https://github.com/Itseez/opencv
Conflicts: modules/features2d/include/opencv2/features2d.hpp modules/features2d/src/freak.cpp modules/features2d/src/stardetector.cpppull/1932/head
@ -0,0 +1,2 @@ |
||||
[tgit] |
||||
icon = doc/opencv.ico |
@ -1,502 +0,0 @@ |
||||
//=============================================================================
|
||||
//
|
||||
// multimon.h -- Stub module that fakes multiple monitor apis on Win32 OSes
|
||||
// without them.
|
||||
//
|
||||
// By using this header your code will get back default values from
|
||||
// GetSystemMetrics() for new metrics, and the new multimonitor APIs
|
||||
// will act like only one display is present on a Win32 OS without
|
||||
// multimonitor APIs.
|
||||
//
|
||||
// Exactly one source must include this with COMPILE_MULTIMON_STUBS defined.
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifdef __cplusplus |
||||
extern "C" { // Assume C declarations for C++
|
||||
#endif // __cplusplus
|
||||
|
||||
//
|
||||
// If we are building with Win95/NT4 headers, we need to declare
|
||||
// the multimonitor-related metrics and APIs ourselves.
|
||||
//
|
||||
#ifndef SM_CMONITORS |
||||
|
||||
#define SM_XVIRTUALSCREEN 76 |
||||
#define SM_YVIRTUALSCREEN 77 |
||||
#define SM_CXVIRTUALSCREEN 78 |
||||
#define SM_CYVIRTUALSCREEN 79 |
||||
#define SM_CMONITORS 80 |
||||
#define SM_SAMEDISPLAYFORMAT 81 |
||||
|
||||
// HMONITOR is already declared if WINVER >= 0x0500 in windef.h
|
||||
// This is for components built with an older version number.
|
||||
//
|
||||
#if !defined(HMONITOR_DECLARED) && (WINVER < 0x0500) |
||||
DECLARE_HANDLE(HMONITOR); |
||||
#define HMONITOR_DECLARED |
||||
#endif |
||||
|
||||
#define MONITOR_DEFAULTTONULL 0x00000000 |
||||
#define MONITOR_DEFAULTTOPRIMARY 0x00000001 |
||||
#define MONITOR_DEFAULTTONEAREST 0x00000002 |
||||
|
||||
#define MONITORINFOF_PRIMARY 0x00000001 |
||||
|
||||
typedef struct tagMONITORINFO |
||||
{ |
||||
DWORD cbSize; |
||||
RECT rcMonitor; |
||||
RECT rcWork; |
||||
DWORD dwFlags; |
||||
} MONITORINFO, *LPMONITORINFO; |
||||
|
||||
#ifndef CCHDEVICENAME |
||||
#define CCHDEVICENAME 32 |
||||
#endif |
||||
|
||||
#ifdef __cplusplus |
||||
typedef struct tagMONITORINFOEXA : public tagMONITORINFO |
||||
{ |
||||
CHAR szDevice[CCHDEVICENAME]; |
||||
} MONITORINFOEXA, *LPMONITORINFOEXA; |
||||
typedef struct tagMONITORINFOEXW : public tagMONITORINFO |
||||
{ |
||||
WCHAR szDevice[CCHDEVICENAME]; |
||||
} MONITORINFOEXW, *LPMONITORINFOEXW; |
||||
#ifdef UNICODE |
||||
typedef MONITORINFOEXW MONITORINFOEX; |
||||
typedef LPMONITORINFOEXW LPMONITORINFOEX; |
||||
#else |
||||
typedef MONITORINFOEXA MONITORINFOEX; |
||||
typedef LPMONITORINFOEXA LPMONITORINFOEX; |
||||
#endif // UNICODE
|
||||
#else // ndef __cplusplus
|
||||
typedef struct tagMONITORINFOEXA |
||||
{ |
||||
MONITORINFO; |
||||
CHAR szDevice[CCHDEVICENAME]; |
||||
} MONITORINFOEXA, *LPMONITORINFOEXA; |
||||
typedef struct tagMONITORINFOEXW |
||||
{ |
||||
MONITORINFO; |
||||
WCHAR szDevice[CCHDEVICENAME]; |
||||
} MONITORINFOEXW, *LPMONITORINFOEXW; |
||||
#ifdef UNICODE |
||||
typedef MONITORINFOEXW MONITORINFOEX; |
||||
typedef LPMONITORINFOEXW LPMONITORINFOEX; |
||||
#else |
||||
typedef MONITORINFOEXA MONITORINFOEX; |
||||
typedef LPMONITORINFOEXA LPMONITORINFOEX; |
||||
#endif // UNICODE
|
||||
#endif |
||||
|
||||
typedef BOOL (CALLBACK* MONITORENUMPROC)(HMONITOR, HDC, LPRECT, LPARAM); |
||||
|
||||
#ifndef DISPLAY_DEVICE_ATTACHED_TO_DESKTOP |
||||
typedef struct _DISPLAY_DEVICEA { |
||||
DWORD cb; |
||||
CHAR DeviceName[32]; |
||||
CHAR DeviceString[128]; |
||||
DWORD StateFlags; |
||||
CHAR DeviceID[128]; |
||||
CHAR DeviceKey[128]; |
||||
} DISPLAY_DEVICEA, *PDISPLAY_DEVICEA, *LPDISPLAY_DEVICEA; |
||||
typedef struct _DISPLAY_DEVICEW { |
||||
DWORD cb; |
||||
WCHAR DeviceName[32]; |
||||
WCHAR DeviceString[128]; |
||||
DWORD StateFlags; |
||||
WCHAR DeviceID[128]; |
||||
WCHAR DeviceKey[128]; |
||||
} DISPLAY_DEVICEW, *PDISPLAY_DEVICEW, *LPDISPLAY_DEVICEW; |
||||
#ifdef UNICODE |
||||
typedef DISPLAY_DEVICEW DISPLAY_DEVICE; |
||||
typedef PDISPLAY_DEVICEW PDISPLAY_DEVICE; |
||||
typedef LPDISPLAY_DEVICEW LPDISPLAY_DEVICE; |
||||
#else |
||||
typedef DISPLAY_DEVICEA DISPLAY_DEVICE; |
||||
typedef PDISPLAY_DEVICEA PDISPLAY_DEVICE; |
||||
typedef LPDISPLAY_DEVICEA LPDISPLAY_DEVICE; |
||||
#endif // UNICODE
|
||||
|
||||
#define DISPLAY_DEVICE_ATTACHED_TO_DESKTOP 0x00000001 |
||||
#define DISPLAY_DEVICE_MULTI_DRIVER 0x00000002 |
||||
#define DISPLAY_DEVICE_PRIMARY_DEVICE 0x00000004 |
||||
#define DISPLAY_DEVICE_MIRRORING_DRIVER 0x00000008 |
||||
#define DISPLAY_DEVICE_VGA_COMPATIBLE 0x00000010 |
||||
#endif |
||||
|
||||
#endif // SM_CMONITORS
|
||||
|
||||
#undef GetMonitorInfo |
||||
#undef GetSystemMetrics |
||||
#undef MonitorFromWindow |
||||
#undef MonitorFromRect |
||||
#undef MonitorFromPoint |
||||
#undef EnumDisplayMonitors |
||||
#undef EnumDisplayDevices |
||||
|
||||
//
|
||||
// Define COMPILE_MULTIMON_STUBS to compile the stubs;
|
||||
// otherwise, you get the declarations.
|
||||
//
|
||||
#ifdef COMPILE_MULTIMON_STUBS |
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Implement the API stubs.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef _MULTIMON_USE_SECURE_CRT |
||||
#if defined(__GOT_SECURE_LIB__) && __GOT_SECURE_LIB__ >= 200402L |
||||
#define _MULTIMON_USE_SECURE_CRT 1 |
||||
#else |
||||
#define _MULTIMON_USE_SECURE_CRT 0 |
||||
#endif |
||||
#endif |
||||
|
||||
#ifndef MULTIMON_FNS_DEFINED |
||||
|
||||
int (WINAPI* g_pfnGetSystemMetrics)(int) = NULL; |
||||
HMONITOR (WINAPI* g_pfnMonitorFromWindow)(HWND, DWORD) = NULL; |
||||
HMONITOR (WINAPI* g_pfnMonitorFromRect)(LPCRECT, DWORD) = NULL; |
||||
HMONITOR (WINAPI* g_pfnMonitorFromPoint)(POINT, DWORD) = NULL; |
||||
BOOL (WINAPI* g_pfnGetMonitorInfo)(HMONITOR, LPMONITORINFO) = NULL; |
||||
BOOL (WINAPI* g_pfnEnumDisplayMonitors)(HDC, LPCRECT, MONITORENUMPROC, LPARAM) = NULL; |
||||
BOOL (WINAPI* g_pfnEnumDisplayDevices)(PVOID, DWORD, PDISPLAY_DEVICE,DWORD) = NULL; |
||||
BOOL g_fMultiMonInitDone = FALSE; |
||||
BOOL g_fMultimonPlatformNT = FALSE; |
||||
|
||||
#endif |
||||
|
||||
BOOL IsPlatformNT() |
||||
{ |
||||
OSVERSIONINFOA osvi = {0}; |
||||
osvi.dwOSVersionInfoSize = sizeof(osvi); |
||||
GetVersionExA((OSVERSIONINFOA*)&osvi); |
||||
return (VER_PLATFORM_WIN32_NT == osvi.dwPlatformId); |
||||
} |
||||
|
||||
BOOL InitMultipleMonitorStubs(void) |
||||
{ |
||||
HMODULE hUser32; |
||||
if (g_fMultiMonInitDone) |
||||
{ |
||||
return g_pfnGetMonitorInfo != NULL; |
||||
} |
||||
|
||||
g_fMultimonPlatformNT = IsPlatformNT(); |
||||
hUser32 = GetModuleHandle(TEXT("USER32")); |
||||
if (hUser32 && |
||||
(*(FARPROC*)&g_pfnGetSystemMetrics = GetProcAddress(hUser32,"GetSystemMetrics")) != NULL && |
||||
(*(FARPROC*)&g_pfnMonitorFromWindow = GetProcAddress(hUser32,"MonitorFromWindow")) != NULL && |
||||
(*(FARPROC*)&g_pfnMonitorFromRect = GetProcAddress(hUser32,"MonitorFromRect")) != NULL && |
||||
(*(FARPROC*)&g_pfnMonitorFromPoint = GetProcAddress(hUser32,"MonitorFromPoint")) != NULL && |
||||
(*(FARPROC*)&g_pfnEnumDisplayMonitors = GetProcAddress(hUser32,"EnumDisplayMonitors")) != NULL && |
||||
#ifdef UNICODE |
||||
(*(FARPROC*)&g_pfnEnumDisplayDevices = GetProcAddress(hUser32,"EnumDisplayDevicesW")) != NULL && |
||||
(*(FARPROC*)&g_pfnGetMonitorInfo = g_fMultimonPlatformNT ? GetProcAddress(hUser32,"GetMonitorInfoW") : |
||||
GetProcAddress(hUser32,"GetMonitorInfoA")) != NULL |
||||
#else |
||||
(*(FARPROC*)&g_pfnGetMonitorInfo = GetProcAddress(hUser32,"GetMonitorInfoA")) != NULL && |
||||
(*(FARPROC*)&g_pfnEnumDisplayDevices = GetProcAddress(hUser32,"EnumDisplayDevicesA")) != NULL |
||||
#endif |
||||
) { |
||||
g_fMultiMonInitDone = TRUE; |
||||
return TRUE; |
||||
} |
||||
else |
||||
{ |
||||
g_pfnGetSystemMetrics = NULL; |
||||
g_pfnMonitorFromWindow = NULL; |
||||
g_pfnMonitorFromRect = NULL; |
||||
g_pfnMonitorFromPoint = NULL; |
||||
g_pfnGetMonitorInfo = NULL; |
||||
g_pfnEnumDisplayMonitors = NULL; |
||||
g_pfnEnumDisplayDevices = NULL; |
||||
|
||||
g_fMultiMonInitDone = TRUE; |
||||
return FALSE; |
||||
} |
||||
} |
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// fake implementations of Monitor APIs that work with the primary display
|
||||
// no special parameter validation is made since these run in client code
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
int WINAPI |
||||
xGetSystemMetrics(int nIndex) |
||||
{ |
||||
if (InitMultipleMonitorStubs()) |
||||
return g_pfnGetSystemMetrics(nIndex); |
||||
|
||||
switch (nIndex) |
||||
{ |
||||
case SM_CMONITORS: |
||||
case SM_SAMEDISPLAYFORMAT: |
||||
return 1; |
||||
|
||||
case SM_XVIRTUALSCREEN: |
||||
case SM_YVIRTUALSCREEN: |
||||
return 0; |
||||
|
||||
case SM_CXVIRTUALSCREEN: |
||||
nIndex = SM_CXSCREEN; |
||||
break; |
||||
|
||||
case SM_CYVIRTUALSCREEN: |
||||
nIndex = SM_CYSCREEN; |
||||
break; |
||||
} |
||||
|
||||
return GetSystemMetrics(nIndex); |
||||
} |
||||
|
||||
#define xPRIMARY_MONITOR ((HMONITOR)0x12340042) |
||||
|
||||
HMONITOR WINAPI |
||||
xMonitorFromPoint(POINT ptScreenCoords, DWORD dwFlags) |
||||
{ |
||||
if (InitMultipleMonitorStubs()) |
||||
return g_pfnMonitorFromPoint(ptScreenCoords, dwFlags); |
||||
|
||||
if ((dwFlags & (MONITOR_DEFAULTTOPRIMARY | MONITOR_DEFAULTTONEAREST)) || |
||||
((ptScreenCoords.x >= 0) && |
||||
(ptScreenCoords.x < GetSystemMetrics(SM_CXSCREEN)) && |
||||
(ptScreenCoords.y >= 0) && |
||||
(ptScreenCoords.y < GetSystemMetrics(SM_CYSCREEN)))) |
||||
{ |
||||
return xPRIMARY_MONITOR; |
||||
} |
||||
|
||||
return NULL; |
||||
} |
||||
|
||||
HMONITOR WINAPI |
||||
xMonitorFromRect(LPCRECT lprcScreenCoords, DWORD dwFlags) |
||||
{ |
||||
if (InitMultipleMonitorStubs()) |
||||
return g_pfnMonitorFromRect(lprcScreenCoords, dwFlags); |
||||
|
||||
if ((dwFlags & (MONITOR_DEFAULTTOPRIMARY | MONITOR_DEFAULTTONEAREST)) || |
||||
((lprcScreenCoords->right > 0) && |
||||
(lprcScreenCoords->bottom > 0) && |
||||
(lprcScreenCoords->left < GetSystemMetrics(SM_CXSCREEN)) && |
||||
(lprcScreenCoords->top < GetSystemMetrics(SM_CYSCREEN)))) |
||||
{ |
||||
return xPRIMARY_MONITOR; |
||||
} |
||||
|
||||
return NULL; |
||||
} |
||||
|
||||
HMONITOR WINAPI |
||||
xMonitorFromWindow(HWND hWnd, DWORD dwFlags) |
||||
{ |
||||
WINDOWPLACEMENT wp; |
||||
|
||||
if (InitMultipleMonitorStubs()) |
||||
return g_pfnMonitorFromWindow(hWnd, dwFlags); |
||||
|
||||
if (dwFlags & (MONITOR_DEFAULTTOPRIMARY | MONITOR_DEFAULTTONEAREST)) |
||||
return xPRIMARY_MONITOR; |
||||
|
||||
if (IsIconic(hWnd) ? |
||||
GetWindowPlacement(hWnd, &wp) : |
||||
GetWindowRect(hWnd, &wp.rcNormalPosition)) { |
||||
|
||||
return xMonitorFromRect(&wp.rcNormalPosition, dwFlags); |
||||
} |
||||
|
||||
return NULL; |
||||
} |
||||
|
||||
BOOL WINAPI |
||||
xGetMonitorInfo(HMONITOR hMonitor, __inout LPMONITORINFO lpMonitorInfo) |
||||
{ |
||||
RECT rcWork; |
||||
|
||||
if (InitMultipleMonitorStubs()) |
||||
{ |
||||
BOOL f = g_pfnGetMonitorInfo(hMonitor, lpMonitorInfo); |
||||
#ifdef UNICODE |
||||
if (f && !g_fMultimonPlatformNT && (lpMonitorInfo->cbSize >= sizeof(MONITORINFOEX))) |
||||
{ |
||||
MultiByteToWideChar(CP_ACP, 0, |
||||
(LPSTR)((MONITORINFOEX*)lpMonitorInfo)->szDevice, -1, |
||||
((MONITORINFOEX*)lpMonitorInfo)->szDevice, (sizeof(((MONITORINFOEX*)lpMonitorInfo)->szDevice)/sizeof(TCHAR))); |
||||
} |
||||
#endif |
||||
return f; |
||||
} |
||||
|
||||
if ((hMonitor == xPRIMARY_MONITOR) && |
||||
lpMonitorInfo && |
||||
(lpMonitorInfo->cbSize >= sizeof(MONITORINFO)) && |
||||
SystemParametersInfoA(SPI_GETWORKAREA, 0, &rcWork, 0)) |
||||
{ |
||||
lpMonitorInfo->rcMonitor.left = 0; |
||||
lpMonitorInfo->rcMonitor.top = 0; |
||||
lpMonitorInfo->rcMonitor.right = GetSystemMetrics(SM_CXSCREEN); |
||||
lpMonitorInfo->rcMonitor.bottom = GetSystemMetrics(SM_CYSCREEN); |
||||
lpMonitorInfo->rcWork = rcWork; |
||||
lpMonitorInfo->dwFlags = MONITORINFOF_PRIMARY; |
||||
|
||||
if (lpMonitorInfo->cbSize >= sizeof(MONITORINFOEX)) |
||||
{ |
||||
#ifdef UNICODE |
||||
MultiByteToWideChar(CP_ACP, 0, "DISPLAY", -1, ((MONITORINFOEX*)lpMonitorInfo)->szDevice, (sizeof(((MONITORINFOEX*)lpMonitorInfo)->szDevice)/sizeof(TCHAR))); |
||||
#else // UNICODE
|
||||
#if _MULTIMON_USE_SECURE_CRT |
||||
strncpy_s(((MONITORINFOEX*)lpMonitorInfo)->szDevice, (sizeof(((MONITORINFOEX*)lpMonitorInfo)->szDevice)/sizeof(TCHAR)), TEXT("DISPLAY"), (sizeof(((MONITORINFOEX*)lpMonitorInfo)->szDevice)/sizeof(TCHAR)) - 1); |
||||
#else |
||||
lstrcpyn(((MONITORINFOEX*)lpMonitorInfo)->szDevice, TEXT("DISPLAY"), (sizeof(((MONITORINFOEX*)lpMonitorInfo)->szDevice)/sizeof(TCHAR))); |
||||
#endif // _MULTIMON_USE_SECURE_CRT
|
||||
#endif // UNICODE
|
||||
} |
||||
|
||||
return TRUE; |
||||
} |
||||
|
||||
return FALSE; |
||||
} |
||||
|
||||
BOOL WINAPI |
||||
xEnumDisplayMonitors( |
||||
HDC hdcOptionalForPainting, |
||||
LPCRECT lprcEnumMonitorsThatIntersect, |
||||
MONITORENUMPROC lpfnEnumProc, |
||||
LPARAM dwData) |
||||
{ |
||||
RECT rcLimit; |
||||
|
||||
if (InitMultipleMonitorStubs()) { |
||||
return g_pfnEnumDisplayMonitors( |
||||
hdcOptionalForPainting, |
||||
lprcEnumMonitorsThatIntersect, |
||||
lpfnEnumProc, |
||||
dwData); |
||||
} |
||||
|
||||
if (!lpfnEnumProc) |
||||
return FALSE; |
||||
|
||||
rcLimit.left = 0; |
||||
rcLimit.top = 0; |
||||
rcLimit.right = GetSystemMetrics(SM_CXSCREEN); |
||||
rcLimit.bottom = GetSystemMetrics(SM_CYSCREEN); |
||||
|
||||
if (hdcOptionalForPainting) |
||||
{ |
||||
RECT rcClip; |
||||
POINT ptOrg; |
||||
|
||||
switch (GetClipBox(hdcOptionalForPainting, &rcClip)) |
||||
{ |
||||
default: |
||||
if (!GetDCOrgEx(hdcOptionalForPainting, &ptOrg)) |
||||
return FALSE; |
||||
|
||||
OffsetRect(&rcLimit, -ptOrg.x, -ptOrg.y); |
||||
if (IntersectRect(&rcLimit, &rcLimit, &rcClip) && |
||||
(!lprcEnumMonitorsThatIntersect || |
||||
IntersectRect(&rcLimit, &rcLimit, lprcEnumMonitorsThatIntersect))) { |
||||
|
||||
break; |
||||
} |
||||
//fall thru
|
||||
case NULLREGION: |
||||
return TRUE; |
||||
case ERROR: |
||||
return FALSE; |
||||
} |
||||
} else { |
||||
if ( lprcEnumMonitorsThatIntersect && |
||||
!IntersectRect(&rcLimit, &rcLimit, lprcEnumMonitorsThatIntersect)) { |
||||
|
||||
return TRUE; |
||||
} |
||||
} |
||||
|
||||
return lpfnEnumProc( |
||||
xPRIMARY_MONITOR, |
||||
hdcOptionalForPainting, |
||||
&rcLimit, |
||||
dwData); |
||||
} |
||||
|
||||
BOOL WINAPI |
||||
xEnumDisplayDevices( |
||||
PVOID Unused, |
||||
DWORD iDevNum, |
||||
__inout PDISPLAY_DEVICE lpDisplayDevice, |
||||
DWORD dwFlags) |
||||
{ |
||||
if (InitMultipleMonitorStubs()) |
||||
return g_pfnEnumDisplayDevices(Unused, iDevNum, lpDisplayDevice, dwFlags); |
||||
|
||||
if (Unused != NULL) |
||||
return FALSE; |
||||
|
||||
if (iDevNum != 0) |
||||
return FALSE; |
||||
|
||||
if (lpDisplayDevice == NULL || lpDisplayDevice->cb < sizeof(DISPLAY_DEVICE)) |
||||
return FALSE; |
||||
|
||||
#ifdef UNICODE |
||||
MultiByteToWideChar(CP_ACP, 0, "DISPLAY", -1, lpDisplayDevice->DeviceName, (sizeof(lpDisplayDevice->DeviceName)/sizeof(TCHAR))); |
||||
MultiByteToWideChar(CP_ACP, 0, "DISPLAY", -1, lpDisplayDevice->DeviceString, (sizeof(lpDisplayDevice->DeviceString)/sizeof(TCHAR))); |
||||
#else // UNICODE
|
||||
#if _MULTIMON_USE_SECURE_CRT |
||||
strncpy_s((LPTSTR)lpDisplayDevice->DeviceName, (sizeof(lpDisplayDevice->DeviceName)/sizeof(TCHAR)), TEXT("DISPLAY"), (sizeof(lpDisplayDevice->DeviceName)/sizeof(TCHAR)) - 1); |
||||
strncpy_s((LPTSTR)lpDisplayDevice->DeviceString, (sizeof(lpDisplayDevice->DeviceString)/sizeof(TCHAR)), TEXT("DISPLAY"), (sizeof(lpDisplayDevice->DeviceName)/sizeof(TCHAR)) - 1); |
||||
#else |
||||
lstrcpyn((LPTSTR)lpDisplayDevice->DeviceName, TEXT("DISPLAY"), (sizeof(lpDisplayDevice->DeviceName)/sizeof(TCHAR))); |
||||
lstrcpyn((LPTSTR)lpDisplayDevice->DeviceString, TEXT("DISPLAY"), (sizeof(lpDisplayDevice->DeviceString)/sizeof(TCHAR))); |
||||
#endif // _MULTIMON_USE_SECURE_CRT
|
||||
#endif // UNICODE
|
||||
|
||||
lpDisplayDevice->StateFlags = DISPLAY_DEVICE_ATTACHED_TO_DESKTOP | DISPLAY_DEVICE_PRIMARY_DEVICE; |
||||
|
||||
return TRUE; |
||||
} |
||||
|
||||
#undef xPRIMARY_MONITOR |
||||
#undef COMPILE_MULTIMON_STUBS |
||||
|
||||
#else // COMPILE_MULTIMON_STUBS
|
||||
|
||||
extern int WINAPI xGetSystemMetrics(int); |
||||
extern HMONITOR WINAPI xMonitorFromWindow(HWND, DWORD); |
||||
extern HMONITOR WINAPI xMonitorFromRect(LPCRECT, DWORD); |
||||
extern HMONITOR WINAPI xMonitorFromPoint(POINT, DWORD); |
||||
extern BOOL WINAPI xGetMonitorInfo(HMONITOR, LPMONITORINFO); |
||||
extern BOOL WINAPI xEnumDisplayMonitors(HDC, LPCRECT, MONITORENUMPROC, LPARAM); |
||||
extern BOOL WINAPI xEnumDisplayDevices(PVOID, DWORD, PDISPLAY_DEVICE, DWORD); |
||||
|
||||
#endif // COMPILE_MULTIMON_STUBS
|
||||
|
||||
//
|
||||
// build defines that replace the regular APIs with our versions
|
||||
//
|
||||
#define GetSystemMetrics xGetSystemMetrics |
||||
#define MonitorFromWindow xMonitorFromWindow |
||||
#define MonitorFromRect xMonitorFromRect |
||||
#define MonitorFromPoint xMonitorFromPoint |
||||
#define GetMonitorInfo xGetMonitorInfo |
||||
#define EnumDisplayMonitors xEnumDisplayMonitors |
||||
#define EnumDisplayDevices xEnumDisplayDevices |
||||
|
||||
#ifdef __cplusplus |
||||
} |
||||
#endif // __cplusplus
|
||||
|
||||
|
@ -0,0 +1,14 @@ |
||||
if(WIN32) |
||||
try_compile(__VALID_DIRECTX |
||||
"${OpenCV_BINARY_DIR}" |
||||
"${OpenCV_SOURCE_DIR}/cmake/checks/directx.cpp" |
||||
OUTPUT_VARIABLE TRY_OUT |
||||
) |
||||
if(NOT __VALID_DIRECTX) |
||||
return() |
||||
endif() |
||||
set(HAVE_DIRECTX ON) |
||||
set(HAVE_D3D11 ON) |
||||
set(HAVE_D3D10 ON) |
||||
set(HAVE_D3D9 ON) |
||||
endif() |
@ -0,0 +1,20 @@ |
||||
# Main variables: |
||||
# INTELPERC_LIBRARIES and INTELPERC_INCLUDE to link Intel Perceptial Computing SDK modules |
||||
# HAVE_INTELPERC for conditional compilation OpenCV with/without Intel Perceptial Computing SDK |
||||
|
||||
if(X86_64) |
||||
find_path(INTELPERC_INCLUDE_DIR "pxcsession.h" PATHS "$ENV{PCSDK_DIR}include" DOC "Path to Intel Perceptual Computing SDK interface headers") |
||||
find_file(INTELPERC_LIBRARIES "libpxc.lib" PATHS "$ENV{PCSDK_DIR}lib/x64" DOC "Path to Intel Perceptual Computing SDK interface libraries") |
||||
else() |
||||
find_path(INTELPERC_INCLUDE_DIR "pxcsession.h" PATHS "$ENV{PCSDK_DIR}include" DOC "Path to Intel Perceptual Computing SDK interface headers") |
||||
find_file(INTELPERC_LIBRARIES "libpxc.lib" PATHS "$ENV{PCSDK_DIR}lib/Win32" DOC "Path to Intel Perceptual Computing SDK interface libraries") |
||||
endif() |
||||
|
||||
if(INTELPERC_INCLUDE_DIR AND INTELPERC_LIBRARIES) |
||||
set(HAVE_INTELPERC TRUE) |
||||
else() |
||||
set(HAVE_INTELPERC FALSE) |
||||
message(WARNING "Intel Perceptual Computing SDK library directory (set by INTELPERC_LIB_DIR variable) is not found or does not have Intel Perceptual Computing SDK libraries.") |
||||
endif() #if(INTELPERC_INCLUDE_DIR AND INTELPERC_LIBRARIES) |
||||
|
||||
mark_as_advanced(FORCE INTELPERC_LIBRARIES INTELPERC_INCLUDE_DIR) |
@ -0,0 +1,110 @@ |
||||
if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") |
||||
set(CPACK_set_DESTDIR "on") |
||||
|
||||
if(NOT OPENCV_CUSTOM_PACKAGE_INFO) |
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Open Computer Vision Library") |
||||
set(CPACK_PACKAGE_DESCRIPTION |
||||
"OpenCV (Open Source Computer Vision Library) is an open source computer vision |
||||
and machine learning software library. OpenCV was built to provide a common |
||||
infrastructure for computer vision applications and to accelerate the use of |
||||
machine perception in the commercial products. Being a BSD-licensed product, |
||||
OpenCV makes it easy for businesses to utilize and modify the code.") |
||||
set(CPACK_PACKAGE_VENDOR "OpenCV Foundation") |
||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") |
||||
set(CPACK_PACKAGE_CONTACT "admin@opencv.org") |
||||
set(CPACK_PACKAGE_VERSION_MAJOR "${OPENCV_VERSION_MAJOR}") |
||||
set(CPACK_PACKAGE_VERSION_MINOR "${OPENCV_VERSION_MINOR}") |
||||
set(CPACK_PACKAGE_VERSION_PATCH "${OPENCV_VERSION_PATCH}") |
||||
set(CPACK_PACKAGE_VERSION "${OPENCV_VCSVERSION}") |
||||
endif(NOT OPENCV_CUSTOM_PACKAGE_INFO) |
||||
|
||||
#arch |
||||
if(X86) |
||||
set(CPACK_DEBIAN_ARCHITECTURE "i386") |
||||
set(CPACK_RPM_PACKAGE_ARCHITECTURE "i686") |
||||
elseif(X86_64) |
||||
set(CPACK_DEBIAN_ARCHITECTURE "amd64") |
||||
set(CPACK_RPM_PACKAGE_ARCHITECTURE "x86_64") |
||||
elseif(ARM) |
||||
set(CPACK_DEBIAN_ARCHITECTURE "armhf") |
||||
set(CPACK_RPM_PACKAGE_ARCHITECTURE "armhf") |
||||
else() |
||||
set(CPACK_DEBIAN_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR}) |
||||
set(CPACK_RPM_PACKAGE_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR}) |
||||
endif() |
||||
|
||||
if(CPACK_GENERATOR STREQUAL "DEB") |
||||
set(OPENCV_PACKAGE_ARCH_SUFFIX ${CPACK_DEBIAN_ARCHITECTURE}) |
||||
elseif(CPACK_GENERATOR STREQUAL "RPM") |
||||
set(OPENCV_PACKAGE_ARCH_SUFFIX ${CPACK_RPM_PACKAGE_ARCHITECTURE}) |
||||
else() |
||||
set(OPENCV_PACKAGE_ARCH_SUFFIX ${CMAKE_SYSTEM_PROCESSOR}) |
||||
endif() |
||||
|
||||
set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${OPENCV_VCSVERSION}-${OPENCV_PACKAGE_ARCH_SUFFIX}") |
||||
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${OPENCV_VCSVERSION}-${OPENCV_PACKAGE_ARCH_SUFFIX}") |
||||
|
||||
#rpm options |
||||
set(CPACK_RPM_COMPONENT_INSTALL TRUE) |
||||
set(CPACK_RPM_PACKAGE_SUMMARY ${CPACK_PACKAGE_DESCRIPTION_SUMMARY}) |
||||
set(CPACK_RPM_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION}) |
||||
set(CPACK_RPM_PACKAGE_URL "http://opencv.org") |
||||
set(CPACK_RPM_PACKAGE_LICENSE "BSD") |
||||
|
||||
#deb options |
||||
set(CPACK_DEB_COMPONENT_INSTALL TRUE) |
||||
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") |
||||
set(CPACK_DEBIAN_PACKAGE_SECTION "libs") |
||||
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://opencv.org") |
||||
|
||||
#depencencies |
||||
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS TRUE) |
||||
set(CPACK_COMPONENT_samples_DEPENDS libs) |
||||
set(CPACK_COMPONENT_dev_DEPENDS libs) |
||||
set(CPACK_COMPONENT_docs_DEPENDS libs) |
||||
set(CPACK_COMPONENT_java_DEPENDS libs) |
||||
set(CPACK_COMPONENT_python_DEPENDS libs) |
||||
set(CPACK_COMPONENT_tests_DEPENDS libs) |
||||
|
||||
if(HAVE_CUDA) |
||||
string(REPLACE "." "-" cuda_version_suffix ${CUDA_VERSION}) |
||||
set(CPACK_DEB_libs_PACKAGE_DEPENDS "cuda-core-libs-${cuda_version_suffix}, cuda-extra-libs-${cuda_version_suffix}") |
||||
set(CPACK_COMPONENT_dev_DEPENDS libs) |
||||
set(CPACK_DEB_dev_PACKAGE_DEPENDS "cuda-headers-${cuda_version_suffix}") |
||||
endif() |
||||
|
||||
if(NOT OPENCV_CUSTOM_PACKAGE_INFO) |
||||
set(CPACK_COMPONENT_libs_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}") |
||||
set(CPACK_COMPONENT_libs_DESCRIPTION "Open Computer Vision Library") |
||||
|
||||
set(CPACK_COMPONENT_python_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-python") |
||||
set(CPACK_COMPONENT_python_DESCRIPTION "Python bindings for Open Source Computer Vision Library") |
||||
|
||||
set(CPACK_COMPONENT_java_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-java") |
||||
set(CPACK_COMPONENT_java_DESCRIPTION "Java bindings for Open Source Computer Vision Library") |
||||
|
||||
set(CPACK_COMPONENT_dev_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-dev") |
||||
set(CPACK_COMPONENT_dev_DESCRIPTION "Development files for Open Source Computer Vision Library") |
||||
|
||||
set(CPACK_COMPONENT_docs_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-docs") |
||||
set(CPACK_COMPONENT_docs_DESCRIPTION "Documentation for Open Source Computer Vision Library") |
||||
|
||||
set(CPACK_COMPONENT_samples_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-samples") |
||||
set(CPACK_COMPONENT_samples_DESCRIPTION "Samples for Open Source Computer Vision Library") |
||||
|
||||
set(CPACK_COMPONENT_tests_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-tests") |
||||
set(CPACK_COMPONENT_tests_DESCRIPTION "Accuracy and performance tests for Open Source Computer Vision Library") |
||||
endif(NOT OPENCV_CUSTOM_PACKAGE_INFO) |
||||
|
||||
if(NOT OPENCV_CUSTOM_PACKAGE_LAYOUT) |
||||
set(CPACK_libs_COMPONENT_INSTALL TRUE) |
||||
set(CPACK_dev_COMPONENT_INSTALL TRUE) |
||||
set(CPACK_docs_COMPONENT_INSTALL TRUE) |
||||
set(CPACK_python_COMPONENT_INSTALL TRUE) |
||||
set(CPACK_java_COMPONENT_INSTALL TRUE) |
||||
set(CPACK_samples_COMPONENT_INSTALL TRUE) |
||||
endif(NOT OPENCV_CUSTOM_PACKAGE_LAYOUT) |
||||
|
||||
include(CPack) |
||||
|
||||
ENDif(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") |
@ -0,0 +1,70 @@ |
||||
#include <windows.h> |
||||
|
||||
#include <d3d11.h> |
||||
#pragma comment (lib, "d3d11.lib") |
||||
|
||||
HINSTANCE g_hInst = NULL; |
||||
D3D_DRIVER_TYPE g_driverType = D3D_DRIVER_TYPE_NULL; |
||||
D3D_FEATURE_LEVEL g_featureLevel = D3D_FEATURE_LEVEL_11_0; |
||||
ID3D11Device* g_pd3dDevice = NULL; |
||||
ID3D11DeviceContext* g_pImmediateContext = NULL; |
||||
IDXGISwapChain* g_pSwapChain = NULL; |
||||
|
||||
static HRESULT InitDevice() |
||||
{ |
||||
HRESULT hr = S_OK; |
||||
|
||||
UINT width = 640; |
||||
UINT height = 480; |
||||
|
||||
UINT createDeviceFlags = 0; |
||||
|
||||
D3D_DRIVER_TYPE driverTypes[] = |
||||
{ |
||||
D3D_DRIVER_TYPE_HARDWARE, |
||||
D3D_DRIVER_TYPE_WARP, |
||||
D3D_DRIVER_TYPE_REFERENCE, |
||||
}; |
||||
UINT numDriverTypes = ARRAYSIZE(driverTypes); |
||||
|
||||
D3D_FEATURE_LEVEL featureLevels[] = |
||||
{ |
||||
D3D_FEATURE_LEVEL_11_0, |
||||
D3D_FEATURE_LEVEL_10_1, |
||||
D3D_FEATURE_LEVEL_10_0, |
||||
}; |
||||
UINT numFeatureLevels = ARRAYSIZE(featureLevels); |
||||
|
||||
DXGI_SWAP_CHAIN_DESC sd; |
||||
ZeroMemory( &sd, sizeof( sd ) ); |
||||
sd.BufferCount = 1; |
||||
sd.BufferDesc.Width = width; |
||||
sd.BufferDesc.Height = height; |
||||
sd.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; |
||||
sd.BufferDesc.RefreshRate.Numerator = 60; |
||||
sd.BufferDesc.RefreshRate.Denominator = 1; |
||||
sd.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; |
||||
sd.OutputWindow = NULL; //g_hWnd;
|
||||
sd.SampleDesc.Count = 1; |
||||
sd.SampleDesc.Quality = 0; |
||||
sd.Windowed = TRUE; |
||||
|
||||
for (UINT driverTypeIndex = 0; driverTypeIndex < numDriverTypes; driverTypeIndex++) |
||||
{ |
||||
g_driverType = driverTypes[driverTypeIndex]; |
||||
hr = D3D11CreateDeviceAndSwapChain(NULL, g_driverType, NULL, createDeviceFlags, featureLevels, numFeatureLevels, |
||||
D3D11_SDK_VERSION, &sd, &g_pSwapChain, &g_pd3dDevice, &g_featureLevel, &g_pImmediateContext); |
||||
if (SUCCEEDED(hr)) |
||||
break; |
||||
} |
||||
if (FAILED(hr)) |
||||
return hr; |
||||
|
||||
return S_OK; |
||||
} |
||||
|
||||
int main(int /*argc*/, char** /*argv*/) |
||||
{ |
||||
InitDevice(); |
||||
return 0; |
||||
} |
@ -0,0 +1,51 @@ |
||||
#!/bin/sh |
||||
|
||||
BASE_DIR=`dirname $0` |
||||
OPENCV_TEST_PATH=$BASE_DIR/@TEST_PATH@ |
||||
OPENCV_TEST_DATA_PATH=$BASE_DIR/sdk/etc/testdata/ |
||||
|
||||
if [ $# -ne 1 ]; then |
||||
echo "Device architecture is not preset in command line" |
||||
echo "Tests are available for architectures: `ls -m ${OPENCV_TEST_PATH}`" |
||||
echo "Usage: $0 <target_device_arch>" |
||||
return 1 |
||||
else |
||||
TARGET_ARCH=$1 |
||||
fi |
||||
|
||||
if [ -z `which adb` ]; then |
||||
echo "adb command was not found in PATH" |
||||
return 1 |
||||
fi |
||||
|
||||
adb push $OPENCV_TEST_DATA_PATH /sdcard/opencv_testdata |
||||
|
||||
adb shell "mkdir -p /data/local/tmp/opencv_test" |
||||
SUMMARY_STATUS=0 |
||||
for t in "$OPENCV_TEST_PATH/$TARGET_ARCH/"opencv_test_* "$OPENCV_TEST_PATH/$TARGET_ARCH/"opencv_perf_*; |
||||
do |
||||
test_name=`basename "$t"` |
||||
report="$test_name-`date --rfc-3339=date`.xml" |
||||
adb push $t /data/local/tmp/opencv_test/ |
||||
adb shell "export OPENCV_TEST_DATA_PATH=/sdcard/opencv_testdata && /data/local/tmp/opencv_test/$test_name --perf_min_samples=1 --perf_force_samples=1 --gtest_output=xml:/data/local/tmp/opencv_test/$report" |
||||
adb pull "/data/local/tmp/opencv_test/$report" $report |
||||
TEST_STATUS=0 |
||||
if [ -e $report ]; then |
||||
if [ `grep -c "<fail" $report` -ne 0 ]; then |
||||
TEST_STATUS=2 |
||||
fi |
||||
else |
||||
TEST_STATUS=3 |
||||
fi |
||||
if [ $TEST_STATUS -ne 0 ]; then |
||||
SUMMARY_STATUS=$TEST_STATUS |
||||
fi |
||||
done |
||||
|
||||
if [ $SUMMARY_STATUS -eq 0 ]; then |
||||
echo "All OpenCV tests finished successfully" |
||||
else |
||||
echo "OpenCV tests finished with status $SUMMARY_STATUS" |
||||
fi |
||||
|
||||
return $SUMMARY_STATUS |
@ -0,0 +1,25 @@ |
||||
#!/bin/sh |
||||
|
||||
OPENCV_TEST_PATH=@CMAKE_INSTALL_PREFIX@/@OPENCV_TEST_INSTALL_PATH@ |
||||
export OPENCV_TEST_DATA_PATH=@CMAKE_INSTALL_PREFIX@/share/OpenCV/testdata |
||||
|
||||
SUMMARY_STATUS=0 |
||||
for t in "$OPENCV_TEST_PATH/"opencv_test_* "$OPENCV_TEST_PATH/"opencv_perf_*; |
||||
do |
||||
report="`basename "$t"`-`date --rfc-3339=date`.xml" |
||||
"$t" --perf_min_samples=1 --perf_force_samples=1 --gtest_output=xml:"$report" |
||||
TEST_STATUS=$? |
||||
if [ $TEST_STATUS -ne 0 ]; then |
||||
SUMMARY_STATUS=$TEST_STATUS |
||||
fi |
||||
done |
||||
|
||||
rm -f /tmp/__opencv_temp.* |
||||
|
||||
if [ $SUMMARY_STATUS -eq 0 ]; then |
||||
echo "All OpenCV tests finished successfully" |
||||
else |
||||
echo "OpenCV tests finished with status $SUMMARY_STATUS" |
||||
fi |
||||
|
||||
return $SUMMARY_STATUS |
@ -0,0 +1,2 @@ |
||||
# Environment setup for OpenCV testing |
||||
export OPENCV_TEST_DATA_PATH=@CMAKE_INSTALL_PREFIX@/share/OpenCV/testdata |
Before Width: | Height: | Size: 147 KiB |
Before Width: | Height: | Size: 163 KiB |
Before Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 68 KiB |
@ -1,418 +0,0 @@ |
||||
.. _Retina_Model: |
||||
|
||||
Discovering the human retina and its use for image processing |
||||
************************************************************* |
||||
|
||||
Goal |
||||
===== |
||||
|
||||
I present here a model of human retina that shows some interesting properties for image preprocessing and enhancement. |
||||
In this tutorial you will learn how to: |
||||
|
||||
.. container:: enumeratevisibleitemswithsquare |
||||
|
||||
+ discover the main two channels outing from your retina |
||||
|
||||
+ see the basics to use the retina model |
||||
|
||||
+ discover some parameters tweaks |
||||
|
||||
|
||||
General overview |
||||
================ |
||||
|
||||
The proposed model originates from Jeanny Herault's research [herault2010]_ at `Gipsa <http://www.gipsa-lab.inpg.fr>`_. It is involved in image processing applications with `Listic <http://www.listic.univ-savoie.fr>`_ (code maintainer and user) lab. This is not a complete model but it already present interesting properties that can be involved for enhanced image processing experience. The model allows the following human retina properties to be used : |
||||
|
||||
* spectral whitening that has 3 important effects: high spatio-temporal frequency signals canceling (noise), mid-frequencies details enhancement and low frequencies luminance energy reduction. This *all in one* property directly allows visual signals cleaning of classical undesired distortions introduced by image sensors and input luminance range. |
||||
|
||||
* local logarithmic luminance compression allows details to be enhanced even in low light conditions. |
||||
|
||||
* decorrelation of the details information (Parvocellular output channel) and transient information (events, motion made available at the Magnocellular output channel). |
||||
|
||||
The first two points are illustrated below : |
||||
|
||||
In the figure below, the OpenEXR image sample *CrissyField.exr*, a High Dynamic Range image is shown. In order to make it visible on this web-page, the original input image is linearly rescaled to the classical image luminance range [0-255] and is converted to 8bit/channel format. Such strong conversion hides many details because of too strong local contrasts. Furthermore, noise energy is also strong and pollutes visual information. |
||||
|
||||
.. image:: images/retina_TreeHdr_small.jpg |
||||
:alt: A High dynamic range image linearly rescaled within range [0-255]. |
||||
:align: center |
||||
|
||||
In the following image, applying the ideas proposed in [benoit2010]_, as your retina does, local luminance adaptation, spatial noise removal and spectral whitening work together and transmit accurate information on lower range 8bit data channels. On this picture, noise in significantly removed, local details hidden by strong luminance contrasts are enhanced. Output image keeps its naturalness and visual content is enhanced. Color processing is based on the color multiplexing/demultiplexing method proposed in [chaix2007]_. |
||||
|
||||
.. image:: images/retina_TreeHdr_retina.jpg |
||||
:alt: A High dynamic range image compressed within range [0-255] using the retina. |
||||
:align: center |
||||
|
||||
|
||||
*Note :* image sample can be downloaded from the `OpenEXR website <http://www.openexr.com>`_. Regarding this demonstration, before retina processing, input image has been linearly rescaled within 0-255 keeping its channels float format. 5% of its histogram ends has been cut (mostly removes wrong HDR pixels). Check out the sample *opencv/samples/cpp/OpenEXRimages_HighDynamicRange_Retina_toneMapping.cpp* for similar processing. The following demonstration will only consider classical 8bit/channel images. |
||||
|
||||
The retina model output channels |
||||
================================ |
||||
|
||||
The retina model presents two outputs that benefit from the above cited behaviors. |
||||
|
||||
* The first one is called the Parvocellular channel. It is mainly active in the foveal retina area (high resolution central vision with color sensitive photo-receptors), its aim is to provide accurate color vision for visual details remaining static on the retina. On the other hand objects moving on the retina projection are blurred. |
||||
|
||||
* The second well known channel is the Magnocellular channel. It is mainly active in the retina peripheral vision and send signals related to change events (motion, transient events, etc.). These outing signals also help visual system to focus/center retina on 'transient'/moving areas for more detailed analysis thus improving visual scene context and object classification. |
||||
|
||||
**NOTE :** regarding the proposed model, contrary to the real retina, we apply these two channels on the entire input images using the same resolution. This allows enhanced visual details and motion information to be extracted on all the considered images... but remember, that these two channels are complementary. For example, if Magnocellular channel gives strong energy in an area, then, the Parvocellular channel is certainly blurred there since there is a transient event. |
||||
|
||||
As an illustration, we apply in the following the retina model on a webcam video stream of a dark visual scene. In this visual scene, captured in an amphitheater of the university, some students are moving while talking to the teacher. |
||||
|
||||
In this video sequence, because of the dark ambiance, signal to noise ratio is low and color artifacts are present on visual features edges because of the low quality image capture tool-chain. |
||||
|
||||
.. image:: images/studentsSample_input.jpg |
||||
:alt: an input video stream extract sample |
||||
:align: center |
||||
|
||||
Below is shown the retina foveal vision applied on the entire image. In the used retina configuration, global luminance is preserved and local contrasts are enhanced. Also, signal to noise ratio is improved : since high frequency spatio-temporal noise is reduced, enhanced details are not corrupted by any enhanced noise. |
||||
|
||||
.. image:: images/studentsSample_parvo.jpg |
||||
:alt: the retina Parvocellular output. Enhanced details, luminance adaptation and noise removal. A processing tool for image analysis. |
||||
:align: center |
||||
|
||||
Below is the output of the Magnocellular output of the retina model. Its signals are strong where transient events occur. Here, a student is moving at the bottom of the image thus generating high energy. The remaining of the image is static however, it is corrupted by a strong noise. Here, the retina filters out most of the noise thus generating low false motion area 'alarms'. This channel can be used as a transient/moving areas detector : it would provide relevant information for a low cost segmentation tool that would highlight areas in which an event is occurring. |
||||
|
||||
.. image:: images/studentsSample_magno.jpg |
||||
:alt: the retina Magnocellular output. Enhanced transient signals (motion, etc.). A preprocessing tool for event detection. |
||||
:align: center |
||||
|
||||
Retina use case |
||||
=============== |
||||
|
||||
This model can be used basically for spatio-temporal video effects but also in the aim of : |
||||
|
||||
* performing texture analysis with enhanced signal to noise ratio and enhanced details robust against input images luminance ranges (check out the Parvocellular retina channel output) |
||||
|
||||
* performing motion analysis also taking benefit of the previously cited properties. |
||||
|
||||
Literature |
||||
========== |
||||
For more information, refer to the following papers : |
||||
|
||||
.. [benoit2010] Benoit A., Caplier A., Durette B., Herault, J., "Using Human Visual System Modeling For Bio-Inspired Low Level Image Processing", Elsevier, Computer Vision and Image Understanding 114 (2010), pp. 758-773. DOI <http://dx.doi.org/10.1016/j.cviu.2010.01.011> |
||||
|
||||
* Please have a look at the reference work of Jeanny Herault that you can read in his book : |
||||
|
||||
.. [herault2010] Vision: Images, Signals and Neural Networks: Models of Neural Processing in Visual Perception (Progress in Neural Processing),By: Jeanny Herault, ISBN: 9814273686. WAPI (Tower ID): 113266891. |
||||
|
||||
This retina filter code includes the research contributions of phd/research collegues from which code has been redrawn by the author : |
||||
|
||||
* take a look at the *retinacolor.hpp* module to discover Brice Chaix de Lavarene phD color mosaicing/demosaicing and his reference paper: |
||||
|
||||
.. [chaix2007] B. Chaix de Lavarene, D. Alleysson, B. Durette, J. Herault (2007). "Efficient demosaicing through recursive filtering", IEEE International Conference on Image Processing ICIP 2007 |
||||
|
||||
* take a look at *imagelogpolprojection.hpp* to discover retina spatial log sampling which originates from Barthelemy Durette phd with Jeanny Herault. A Retina / V1 cortex projection is also proposed and originates from Jeanny's discussions. More informations in the above cited Jeanny Heraults's book. |
||||
|
||||
Code tutorial |
||||
============= |
||||
|
||||
Please refer to the original tutorial source code in file *opencv_folder/samples/cpp/tutorial_code/bioinspired/retina_tutorial.cpp*. |
||||
|
||||
**Note :** do not forget that the retina model is included in the following namespace : *cv::bioinspired*. |
||||
|
||||
To compile it, assuming OpenCV is correctly installed, use the following command. It requires the opencv_core *(cv::Mat and friends objects management)*, opencv_highgui *(display and image/video read)* and opencv_bioinspired *(Retina description)* libraries to compile. |
||||
|
||||
.. code-block:: cpp |
||||
|
||||
// compile |
||||
gcc retina_tutorial.cpp -o Retina_tuto -lopencv_core -lopencv_highgui -lopencv_bioinspired |
||||
|
||||
// Run commands : add 'log' as a last parameter to apply a spatial log sampling (simulates retina sampling) |
||||
// run on webcam |
||||
./Retina_tuto -video |
||||
// run on video file |
||||
./Retina_tuto -video myVideo.avi |
||||
// run on an image |
||||
./Retina_tuto -image myPicture.jpg |
||||
// run on an image with log sampling |
||||
./Retina_tuto -image myPicture.jpg log |
||||
|
||||
Here is a code explanation : |
||||
|
||||
Retina definition is present in the bioinspired package and a simple include allows to use it. You can rather use the specific header : *opencv2/bioinspired.hpp* if you prefer but then include the other required openv modules : *opencv2/core.hpp* and *opencv2/highgui.hpp* |
||||
|
||||
.. code-block:: cpp |
||||
|
||||
#include "opencv2/opencv.hpp" |
||||
|
||||
Provide user some hints to run the program with a help function |
||||
|
||||
.. code-block:: cpp |
||||
|
||||
// the help procedure |
||||
static void help(std::string errorMessage) |
||||
{ |
||||
std::cout<<"Program init error : "<<errorMessage<<std::endl; |
||||
std::cout<<"\nProgram call procedure : retinaDemo [processing mode] [Optional : media target] [Optional LAST parameter: \"log\" to activate retina log sampling]"<<std::endl; |
||||
std::cout<<"\t[processing mode] :"<<std::endl; |
||||
std::cout<<"\t -image : for still image processing"<<std::endl; |
||||
std::cout<<"\t -video : for video stream processing"<<std::endl; |
||||
std::cout<<"\t[Optional : media target] :"<<std::endl; |
||||
std::cout<<"\t if processing an image or video file, then, specify the path and filename of the target to process"<<std::endl; |
||||
std::cout<<"\t leave empty if processing video stream coming from a connected video device"<<std::endl; |
||||
std::cout<<"\t[Optional : activate retina log sampling] : an optional last parameter can be specified for retina spatial log sampling"<<std::endl; |
||||
std::cout<<"\t set \"log\" without quotes to activate this sampling, output frame size will be divided by 4"<<std::endl; |
||||
std::cout<<"\nExamples:"<<std::endl; |
||||
std::cout<<"\t-Image processing : ./retinaDemo -image lena.jpg"<<std::endl; |
||||
std::cout<<"\t-Image processing with log sampling : ./retinaDemo -image lena.jpg log"<<std::endl; |
||||
std::cout<<"\t-Video processing : ./retinaDemo -video myMovie.mp4"<<std::endl; |
||||
std::cout<<"\t-Live video processing : ./retinaDemo -video"<<std::endl; |
||||
std::cout<<"\nPlease start again with new parameters"<<std::endl; |
||||
std::cout<<"****************************************************"<<std::endl; |
||||
std::cout<<" NOTE : this program generates the default retina parameters file 'RetinaDefaultParameters.xml'"<<std::endl; |
||||
std::cout<<" => you can use this to fine tune parameters and load them if you save to file 'RetinaSpecificParameters.xml'"<<std::endl; |
||||
} |
||||
|
||||
Then, start the main program and first declare a *cv::Mat* matrix in which input images will be loaded. Also allocate a *cv::VideoCapture* object ready to load video streams (if necessary) |
||||
|
||||
.. code-block:: cpp |
||||
|
||||
int main(int argc, char* argv[]) { |
||||
// declare the retina input buffer... that will be fed differently in regard of the input media |
||||
cv::Mat inputFrame; |
||||
cv::VideoCapture videoCapture; // in case a video media is used, its manager is declared here |
||||
|
||||
|
||||
In the main program, before processing, first check input command parameters. Here it loads a first input image coming from a single loaded image (if user chose command *-image*) or from a video stream (if user chose command *-video*). Also, if the user added *log* command at the end of its program call, the spatial logarithmic image sampling performed by the retina is taken into account by the Boolean flag *useLogSampling*. |
||||
|
||||
.. code-block:: cpp |
||||
|
||||
// welcome message |
||||
std::cout<<"****************************************************"<<std::endl; |
||||
std::cout<<"* Retina demonstration : demonstrates the use of is a wrapper class of the Gipsa/Listic Labs retina model."<<std::endl; |
||||
std::cout<<"* This demo will try to load the file 'RetinaSpecificParameters.xml' (if exists).\nTo create it, copy the autogenerated template 'RetinaDefaultParameters.xml'.\nThen twaek it with your own retina parameters."<<std::endl; |
||||
// basic input arguments checking |
||||
if (argc<2) |
||||
{ |
||||
help("bad number of parameter"); |
||||
return -1; |
||||
} |
||||
|
||||
bool useLogSampling = !strcmp(argv[argc-1], "log"); // check if user wants retina log sampling processing |
||||
|
||||
std::string inputMediaType=argv[1]; |
||||
|
||||
////////////////////////////////////////////////////////////////////////////// |
||||
// checking input media type (still image, video file, live video acquisition) |
||||
if (!strcmp(inputMediaType.c_str(), "-image") && argc >= 3) |
||||
{ |
||||
std::cout<<"RetinaDemo: processing image "<<argv[2]<<std::endl; |
||||
// image processing case |
||||
inputFrame = cv::imread(std::string(argv[2]), 1); // load image in RGB mode |
||||
}else |
||||
if (!strcmp(inputMediaType.c_str(), "-video")) |
||||
{ |
||||
if (argc == 2 || (argc == 3 && useLogSampling)) // attempt to grab images from a video capture device |
||||
{ |
||||
videoCapture.open(0); |
||||
}else// attempt to grab images from a video filestream |
||||
{ |
||||
std::cout<<"RetinaDemo: processing video stream "<<argv[2]<<std::endl; |
||||
videoCapture.open(argv[2]); |
||||
} |
||||
|
||||
// grab a first frame to check if everything is ok |
||||
videoCapture>>inputFrame; |
||||
}else |
||||
{ |
||||
// bad command parameter |
||||
help("bad command parameter"); |
||||
return -1; |
||||
} |
||||
|
||||
Once all input parameters are processed, a first image should have been loaded, if not, display error and stop program : |
||||
|
||||
.. code-block:: cpp |
||||
|
||||
if (inputFrame.empty()) |
||||
{ |
||||
help("Input media could not be loaded, aborting"); |
||||
return -1; |
||||
} |
||||
|
||||
Now, everything is ready to run the retina model. I propose here to allocate a retina instance and to manage the eventual log sampling option. The Retina constructor expects at least a cv::Size object that shows the input data size that will have to be managed. One can activate other options such as color and its related color multiplexing strategy (here Bayer multiplexing is chosen using *enum cv::bioinspired::RETINA_COLOR_BAYER*). If using log sampling, the image reduction factor (smaller output images) and log sampling strengh can be adjusted. |
||||
|
||||
.. code-block:: cpp |
||||
|
||||
// pointer to a retina object |
||||
cv::Ptr<cv::bioinspired::Retina> myRetina; |
||||
|
||||
// if the last parameter is 'log', then activate log sampling (favour foveal vision and subsamples peripheral vision) |
||||
if (useLogSampling) |
||||
{ |
||||
myRetina = cv::bioinspired::createRetina(inputFrame.size(), true, cv::bioinspired::RETINA_COLOR_BAYER, true, 2.0, 10.0); |
||||
} |
||||
else// -> else allocate "classical" retina : |
||||
myRetina = cv::bioinspired::createRetina(inputFrame.size()); |
||||
|
||||
Once done, the proposed code writes a default xml file that contains the default parameters of the retina. This is useful to make your own config using this template. Here generated template xml file is called *RetinaDefaultParameters.xml*. |
||||
|
||||
.. code-block:: cpp |
||||
|
||||
// save default retina parameters file in order to let you see this and maybe modify it and reload using method "setup" |
||||
myRetina->write("RetinaDefaultParameters.xml"); |
||||
|
||||
In the following line, the retina attempts to load another xml file called *RetinaSpecificParameters.xml*. If you created it and introduced your own setup, it will be loaded, in the other case, default retina parameters are used. |
||||
|
||||
.. code-block:: cpp |
||||
|
||||
// load parameters if file exists |
||||
myRetina->setup("RetinaSpecificParameters.xml"); |
||||
|
||||
It is not required here but just to show it is possible, you can reset the retina buffers to zero to force it to forget past events. |
||||
|
||||
.. code-block:: cpp |
||||
|
||||
// reset all retina buffers (imagine you close your eyes for a long time) |
||||
myRetina->clearBuffers(); |
||||
|
||||
Now, it is time to run the retina ! First create some output buffers ready to receive the two retina channels outputs |
||||
|
||||
.. code-block:: cpp |
||||
|
||||
// declare retina output buffers |
||||
cv::Mat retinaOutput_parvo; |
||||
cv::Mat retinaOutput_magno; |
||||
|
||||
Then, run retina in a loop, load new frames from video sequence if necessary and get retina outputs back to dedicated buffers. |
||||
|
||||
.. code-block:: cpp |
||||
|
||||
// processing loop with no stop condition |
||||
while(true) |
||||
{ |
||||
// if using video stream, then, grabbing a new frame, else, input remains the same |
||||
if (videoCapture.isOpened()) |
||||
videoCapture>>inputFrame; |
||||
|
||||
// run retina filter on the loaded input frame |
||||
myRetina->run(inputFrame); |
||||
// Retrieve and display retina output |
||||
myRetina->getParvo(retinaOutput_parvo); |
||||
myRetina->getMagno(retinaOutput_magno); |
||||
cv::imshow("retina input", inputFrame); |
||||
cv::imshow("Retina Parvo", retinaOutput_parvo); |
||||
cv::imshow("Retina Magno", retinaOutput_magno); |
||||
cv::waitKey(10); |
||||
} |
||||
|
||||
That's done ! But if you want to secure the system, take care and manage Exceptions. The retina can throw some when it sees irrelevant data (no input frame, wrong setup, etc.). |
||||
Then, i recommend to surround all the retina code by a try/catch system like this : |
||||
|
||||
.. code-block:: cpp |
||||
|
||||
try{ |
||||
// pointer to a retina object |
||||
cv::Ptr<cv::Retina> myRetina; |
||||
[---] |
||||
// processing loop with no stop condition |
||||
while(true) |
||||
{ |
||||
[---] |
||||
} |
||||
|
||||
}catch(cv::Exception e) |
||||
{ |
||||
std::cerr<<"Error using Retina : "<<e.what()<<std::endl; |
||||
} |
||||
|
||||
Retina parameters, what to do ? |
||||
=============================== |
||||
|
||||
First, it is recommended to read the reference paper : |
||||
|
||||
* Benoit A., Caplier A., Durette B., Herault, J., *"Using Human Visual System Modeling For Bio-Inspired Low Level Image Processing"*, Elsevier, Computer Vision and Image Understanding 114 (2010), pp. 758-773. DOI <http://dx.doi.org/10.1016/j.cviu.2010.01.011> |
||||
|
||||
Once done open the configuration file *RetinaDefaultParameters.xml* generated by the demo and let's have a look at it. |
||||
|
||||
.. code-block:: cpp |
||||
|
||||
<?xml version="1.0"?> |
||||
<opencv_storage> |
||||
<OPLandIPLparvo> |
||||
<colorMode>1</colorMode> |
||||
<normaliseOutput>1</normaliseOutput> |
||||
<photoreceptorsLocalAdaptationSensitivity>7.5e-01</photoreceptorsLocalAdaptationSensitivity> |
||||
<photoreceptorsTemporalConstant>9.0e-01</photoreceptorsTemporalConstant> |
||||
<photoreceptorsSpatialConstant>5.7e-01</photoreceptorsSpatialConstant> |
||||
<horizontalCellsGain>0.01</horizontalCellsGain> |
||||
<hcellsTemporalConstant>0.5</hcellsTemporalConstant> |
||||
<hcellsSpatialConstant>7.</hcellsSpatialConstant> |
||||
<ganglionCellsSensitivity>7.5e-01</ganglionCellsSensitivity></OPLandIPLparvo> |
||||
<IPLmagno> |
||||
<normaliseOutput>1</normaliseOutput> |
||||
<parasolCells_beta>0.</parasolCells_beta> |
||||
<parasolCells_tau>0.</parasolCells_tau> |
||||
<parasolCells_k>7.</parasolCells_k> |
||||
<amacrinCellsTemporalCutFrequency>2.0e+00</amacrinCellsTemporalCutFrequency> |
||||
<V0CompressionParameter>9.5e-01</V0CompressionParameter> |
||||
<localAdaptintegration_tau>0.</localAdaptintegration_tau> |
||||
<localAdaptintegration_k>7.</localAdaptintegration_k></IPLmagno> |
||||
</opencv_storage> |
||||
|
||||
Here are some hints but actually, the best parameter setup depends more on what you want to do with the retina rather than the images input that you give to retina. Apart from the more specific case of High Dynamic Range images (HDR) that require more specific setup for specific luminance compression objective, the retina behaviors should be rather stable from content to content. Note that OpenCV is able to manage such HDR format thanks to the OpenEXR images compatibility. |
||||
|
||||
Then, if the application target requires details enhancement prior to specific image processing, you need to know if mean luminance information is required or not. If not, the the retina can cancel or significantly reduce its energy thus giving more visibility to higher spatial frequency details. |
||||
|
||||
|
||||
Basic parameters |
||||
---------------- |
||||
|
||||
The most simple parameters are the following : |
||||
|
||||
* **colorMode** : let the retina process color information (if 1) or gray scale images (if 0). In this last case, only the first channel of the input will be processed. |
||||
|
||||
* **normaliseOutput** : each channel has this parameter, if value is 1, then the considered channel output is rescaled between 0 and 255. Take care in this case at the Magnocellular output level (motion/transient channel detection). Residual noise will also be rescaled ! |
||||
|
||||
**Note :** using color requires color channels multiplexing/demultipexing which requires more processing. You can expect much faster processing using gray levels : it would require around 30 product per pixel for all the retina processes and it has recently been parallelized for multicore architectures. |
||||
|
||||
Photo-receptors parameters |
||||
-------------------------- |
||||
|
||||
The following parameters act on the entry point of the retina - photo-receptors - and impact all the following processes. These sensors are low pass spatio-temporal filters that smooth temporal and spatial data and also adjust there sensitivity to local luminance thus improving details extraction and high frequency noise canceling. |
||||
|
||||
* **photoreceptorsLocalAdaptationSensitivity** between 0 and 1. Values close to 1 allow high luminance log compression effect at the photo-receptors level. Values closer to 0 give a more linear sensitivity. Increased alone, it can burn the *Parvo (details channel)* output image. If adjusted in collaboration with **ganglionCellsSensitivity** images can be very contrasted whatever the local luminance there is... at the price of a naturalness decrease. |
||||
|
||||
* **photoreceptorsTemporalConstant** this setups the temporal constant of the low pass filter effect at the entry of the retina. High value lead to strong temporal smoothing effect : moving objects are blurred and can disappear while static object are favored. But when starting the retina processing, stable state is reached lately. |
||||
|
||||
* **photoreceptorsSpatialConstant** specifies the spatial constant related to photo-receptors low pass filter effect. This parameters specify the minimum allowed spatial signal period allowed in the following. Typically, this filter should cut high frequency noise. Then a 0 value doesn't cut anything noise while higher values start to cut high spatial frequencies and more and more lower frequencies... Then, do not go to high if you wanna see some details of the input images ! A good compromise for color images is 0.53 since this won't affect too much the color spectrum. Higher values would lead to gray and blurred output images. |
||||
|
||||
Horizontal cells parameters |
||||
--------------------------- |
||||
|
||||
This parameter set tunes the neural network connected to the photo-receptors, the horizontal cells. It modulates photo-receptors sensitivity and completes the processing for final spectral whitening (part of the spatial band pass effect thus favoring visual details enhancement). |
||||
|
||||
* **horizontalCellsGain** here is a critical parameter ! If you are not interested by the mean luminance and focus on details enhancement, then, set to zero. But if you want to keep some environment luminance data, let some low spatial frequencies pass into the system and set a higher value (<1). |
||||
|
||||
* **hcellsTemporalConstant** similar to photo-receptors, this acts on the temporal constant of a low pass temporal filter that smooths input data. Here, a high value generates a high retina after effect while a lower value makes the retina more reactive. This value should be lower than **photoreceptorsTemporalConstant** to limit strong retina after effects. |
||||
|
||||
* **hcellsSpatialConstant** is the spatial constant of the low pass filter of these cells filter. It specifies the lowest spatial frequency allowed in the following. Visually, a high value leads to very low spatial frequencies processing and leads to salient halo effects. Lower values reduce this effect but the limit is : do not go lower than the value of **photoreceptorsSpatialConstant**. Those 2 parameters actually specify the spatial band-pass of the retina. |
||||
|
||||
**NOTE** after the processing managed by the previous parameters, input data is cleaned from noise and luminance in already partly enhanced. The following parameters act on the last processing stages of the two outing retina signals. |
||||
|
||||
Parvo (details channel) dedicated parameter |
||||
------------------------------------------- |
||||
|
||||
* **ganglionCellsSensitivity** specifies the strength of the final local adaptation occurring at the output of this details dedicated channel. Parameter values remain between 0 and 1. Low value tend to give a linear response while higher values enforces the remaining low contrasted areas. |
||||
|
||||
**Note :** this parameter can correct eventual burned images by favoring low energetic details of the visual scene, even in bright areas. |
||||
|
||||
IPL Magno (motion/transient channel) parameters |
||||
----------------------------------------------- |
||||
|
||||
Once image information is cleaned, this channel acts as a high pass temporal filter that only selects signals related to transient signals (events, motion, etc.). A low pass spatial filter smooths extracted transient data and a final logarithmic compression enhances low transient events thus enhancing event sensitivity. |
||||
|
||||
* **parasolCells_beta** generally set to zero, can be considered as an amplifier gain at the entry point of this processing stage. Generally set to 0. |
||||
|
||||
* **parasolCells_tau** the temporal smoothing effect that can be added |
||||
|
||||
* **parasolCells_k** the spatial constant of the spatial filtering effect, set it at a high value to favor low spatial frequency signals that are lower subject to residual noise. |
||||
|
||||
* **amacrinCellsTemporalCutFrequency** specifies the temporal constant of the high pass filter. High values let slow transient events to be selected. |
||||
|
||||
* **V0CompressionParameter** specifies the strength of the log compression. Similar behaviors to previous description but here it enforces sensitivity of transient events. |
||||
|
||||
* **localAdaptintegration_tau** generally set to 0, no real use here actually |
||||
|
||||
* **localAdaptintegration_k** specifies the size of the area on which local adaptation is performed. Low values lead to short range local adaptation (higher sensitivity to noise), high values secure log compression. |
Before Width: | Height: | Size: 49 KiB |
@ -1,36 +0,0 @@ |
||||
.. _Table-Of-Content-Bioinspired: |
||||
|
||||
*bioinspired* module. Algorithms inspired from biological models |
||||
---------------------------------------------------------------- |
||||
|
||||
Here you will learn how to use additional modules of OpenCV defined in the "bioinspired" module. |
||||
|
||||
.. include:: ../../definitions/tocDefinitions.rst |
||||
|
||||
+ |
||||
.. tabularcolumns:: m{100pt} m{300pt} |
||||
.. cssclass:: toctableopencv |
||||
|
||||
=============== ====================================================== |
||||
|RetinaDemoImg| **Title:** :ref:`Retina_Model` |
||||
|
||||
*Compatibility:* > OpenCV 2.4 |
||||
|
||||
*Author:* |Author_AlexB| |
||||
|
||||
You will learn how to process images and video streams with a model of retina filter for details enhancement, spatio-temporal noise removal, luminance correction and spatio-temporal events detection. |
||||
|
||||
=============== ====================================================== |
||||
|
||||
.. |RetinaDemoImg| image:: images/retina_TreeHdr_small.jpg |
||||
:height: 90pt |
||||
:width: 90pt |
||||
|
||||
.. raw:: latex |
||||
|
||||
\pagebreak |
||||
|
||||
.. toctree:: |
||||
:hidden: |
||||
|
||||
../retina_model/retina_model |
@ -1,36 +0,0 @@ |
||||
.. _Table-Of-Content-Contrib: |
||||
|
||||
*contrib* module. The additional contributions made available ! |
||||
---------------------------------------------------------------- |
||||
|
||||
Here you will learn how to use additional modules of OpenCV defined in the "contrib" module. |
||||
|
||||
.. include:: ../../definitions/tocDefinitions.rst |
||||
|
||||
+ |
||||
.. tabularcolumns:: m{100pt} m{300pt} |
||||
.. cssclass:: toctableopencv |
||||
|
||||
=============== ====================================================== |
||||
|RetinaDemoImg| **Title:** :ref:`Retina_Model` |
||||
|
||||
*Compatibility:* > OpenCV 2.4 |
||||
|
||||
*Author:* |Author_AlexB| |
||||
|
||||
You will learn how to process images and video streams with a model of retina filter for details enhancement, spatio-temporal noise removal, luminance correction and spatio-temporal events detection. |
||||
|
||||
=============== ====================================================== |
||||
|
||||
.. |RetinaDemoImg| image:: images/retina_TreeHdr_small.jpg |
||||
:height: 90pt |
||||
:width: 90pt |
||||
|
||||
.. raw:: latex |
||||
|
||||
\pagebreak |
||||
|
||||
.. toctree:: |
||||
:hidden: |
||||
|
||||
../retina_model/retina_model |
After Width: | Height: | Size: 351 KiB |
After Width: | Height: | Size: 606 KiB |
After Width: | Height: | Size: 7.7 KiB |