1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

Merge branch 4.x

This commit is contained in:
Alexander Smorkalov
2025-02-05 09:28:27 +03:00
180 changed files with 11419 additions and 1819 deletions
+1
View File
@@ -83,6 +83,7 @@ if(WITH_WAYLAND AND HAVE_WAYLAND)
endif()
endif()
ocv_module_include_directories(${WAYLAND_CLIENT_INCLUDE_DIRS} ${XKBCOMMON_INCLUDE_DIRS})
elseif(HAVE_QT)
set(OPENCV_HIGHGUI_BUILTIN_BACKEND "QT${QT_VERSION_MAJOR}")
add_definitions(-DHAVE_QT)
+14 -10
View File
@@ -532,16 +532,20 @@ control panel.
Clicking the label of each trackbar enables editing the trackbar values manually.
@param trackbarname Name of the created trackbar.
@param winname Name of the window that will be used as a parent of the created trackbar.
@param value Optional pointer to an integer variable whose value reflects the position of the
slider. Upon creation, the slider position is defined by this variable.
@param count Maximal position of the slider. The minimal position is always 0.
@param onChange Pointer to the function to be called every time the slider changes position. This
function should be prototyped as void Foo(int,void\*); , where the first parameter is the trackbar
position and the second parameter is the user data (see the next parameter). If the callback is
the NULL pointer, no callbacks are called, but only value is updated.
@param userdata User data that is passed as is to the callback. It can be used to handle trackbar
events without using global variables.
@param winname Name of the window that will contain the trackbar.
@param value Pointer to the integer value that will be changed by the trackbar.
Pass `nullptr` if the value pointer is not used. In this case, manually handle
the trackbar position in the callback function.
@param count Maximum position of the trackbar.
@param onChange Pointer to the function to be called every time the slider changes position.
This function should have the prototype void Foo(int, void\*);, where the first parameter is
the trackbar position, and the second parameter is the user data (see the next parameter).
If the callback is a nullptr, no callbacks are called, but the trackbar's value will still be
updated automatically.
@param userdata Optional user data that is passed to the callback.
@note If the `value` pointer is `nullptr`, the trackbar position must be manually managed.
Call the callback function manually with the desired initial value to avoid runtime warnings.
@see \ref tutorial_trackbar
*/
CV_EXPORTS int createTrackbar(const String& trackbarname, const String& winname,
int* value, int count,
+1 -1
View File
@@ -219,7 +219,7 @@ void cv::setWindowProperty(const String& name, int prop_id, double prop_value)
//change between fullscreen or not.
case cv::WND_PROP_FULLSCREEN:
if (prop_value != cv::WINDOW_NORMAL && prop_value != cv::WINDOW_FULLSCREEN) // bad argument
if ((int)prop_value != cv::WINDOW_NORMAL && (int)prop_value != cv::WINDOW_FULLSCREEN) // bad argument
break;
#if defined (HAVE_QT)
+7 -5
View File
@@ -595,14 +595,16 @@ cv::Rect cvGetWindowRect_COCOA( const char* name )
{
CV_Error( cv::Error::StsNullPtr, "NULL window" );
} else {
NSRect rect = [window frame];
@autoreleasepool {
NSRect rect = [window frame];
#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_6
NSPoint pt = [window convertRectToScreen:rect].origin;
NSPoint pt = [window convertRectToScreen:rect].origin;
#else
NSPoint pt = [window convertBaseToScreen:rect.origin];
NSPoint pt = [window convertBaseToScreen:rect.origin];
#endif
NSSize sz = [[[window contentView] image] size];
result = cv::Rect(pt.x, pt.y, sz.width, sz.height);
NSSize sz = [[[window contentView] image] size];
result = cv::Rect(pt.x, pt.y, sz.width, sz.height);
}
}
return result;
}
+1 -1
View File
@@ -2108,7 +2108,7 @@ public:
switch (prop)
{
case cv::WND_PROP_FULLSCREEN:
if (value != cv::WINDOW_NORMAL && value != cv::WINDOW_FULLSCREEN) // bad arg
if ((int)value != cv::WINDOW_NORMAL && (int)value != cv::WINDOW_FULLSCREEN) // bad arg
break;
setModeWindow_(window, value);
return true;
+4 -1
View File
@@ -2111,6 +2111,9 @@ static void showSaveDialog(CvWindow& window)
#ifdef HAVE_JPEG
"JPEG files (*.jpeg;*.jpg;*.jpe)\0*.jpeg;*.jpg;*.jpe\0"
#endif
#ifdef HAVE_JPEGXL
"JPEG XL files (*.jxl)\0*.jxl\0"
#endif
#ifdef HAVE_TIFF
"TIFF Files (*.tiff;*.tif)\0*.tiff;*.tif\0"
#endif
@@ -2686,7 +2689,7 @@ public:
switch ((WindowPropertyFlags)prop)
{
case WND_PROP_FULLSCREEN:
if (value != WINDOW_NORMAL && value != WINDOW_FULLSCREEN) // bad arg
if ((int)value != WINDOW_NORMAL && (int)value != WINDOW_FULLSCREEN) // bad arg
break;
setModeWindow_(window, (int)value);
return true;