1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

Merge branch 4.x

This commit is contained in:
Alexander Smorkalov
2026-04-07 12:02:55 +03:00
28 changed files with 2027 additions and 118 deletions
@@ -43,8 +43,7 @@ public final class HighGui {
public static void imshow(String winname, Mat img) {
if (img.empty()) {
System.err.println("Error: Empty image in imshow");
System.exit(-1);
throw new IllegalArgumentException("Image is empty");
} else {
ImageWindow tmpWindow = windows.get(winname);
if (tmpWindow == null) {
@@ -113,8 +112,7 @@ public final class HighGui {
// If there are no windows to be shown return
if (windows.isEmpty()) {
System.err.println("Error: waitKey must be used after an imshow");
System.exit(-1);
throw new IllegalStateException("No windows created. Call imshow() first");
}
// Remove the unused windows
@@ -145,8 +143,7 @@ public final class HighGui {
win.lbl.setIcon(icon);
}
} else {
System.err.println("Error: no imshow associated with" + " namedWindow: \"" + win.name + "\"");
System.exit(-1);
throw new IllegalStateException("No image set for window: \"" + win.name + "\". Call imshow() first");
}
}
@@ -158,6 +155,7 @@ public final class HighGui {
}
} catch (InterruptedException e) {
e.printStackTrace();
Thread.currentThread().interrupt();
}
// Set all windows as already used