opencv package is retired on c9s for CS-362

This commit is contained in:
Troy Dawson 2022-04-14 12:49:31 -07:00
parent e786d0db9b
commit c60dccdf40
11 changed files with 1 additions and 1966 deletions

4
.gitignore vendored
View File

@ -1,4 +0,0 @@
OpenCV*.tar.*
opencv*.tar.*
face_landmark_model.dat.xz
/b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip

View File

@ -1,24 +0,0 @@
From 7856f14558f37021c1d5b76ade40ac78e59a422d Mon Sep 17 00:00:00 2001
From: Maksim Shabunin <maksim.shabunin@gmail.com>
Date: Sat, 30 May 2020 06:07:39 +0300
Subject: [PATCH] Added VTK 9 support
---
cmake/OpenCVDetectVTK.cmake | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/cmake/OpenCVDetectVTK.cmake b/cmake/OpenCVDetectVTK.cmake
index 0f2b9584e12..23d17c35241 100644
--- a/cmake/OpenCVDetectVTK.cmake
+++ b/cmake/OpenCVDetectVTK.cmake
@@ -1,3 +1,10 @@
+# VTK 9.0
+find_package(VTK QUIET NAMES vtk COMPONENTS InteractionStyle RenderingLOD IOPLY FiltersTexture RenderingFreeType IOExport IOGeometry FiltersExtraction RenderingCore NO_MODULE)
+if(VTK_FOUND)
+ set(HAVE_VTK ON)
+ return()
+endif()
+
# VTK 6.x components
find_package(VTK QUIET COMPONENTS vtkInteractionStyle vtkRenderingLOD vtkIOPLY vtkFiltersTexture vtkRenderingFreeType vtkIOExport NO_MODULE)
IF(VTK_FOUND)

View File

@ -1,507 +0,0 @@
From c4b3b920461f9c7207d4c184a5bedf7608a51ed1 Mon Sep 17 00:00:00 2001
From: Maksim Shabunin <maksim.shabunin@gmail.com>
Date: Sat, 30 May 2020 06:09:02 +0300
Subject: [PATCH 1/3] Added VTK 9 support
---
modules/viz/CMakeLists.txt | 4 +++-
modules/viz/src/precomp.hpp | 8 +++++++-
modules/viz/src/types.cpp | 3 ++-
modules/viz/src/vizimpl.cpp | 13 +++++++++++--
modules/viz/src/vtk/vtkOBJWriter.cpp | 14 +++++++++-----
modules/viz/src/vtk/vtkXYZReader.cpp | 2 +-
modules/viz/src/vtk/vtkXYZWriter.cpp | 2 +-
7 files changed, 34 insertions(+), 12 deletions(-)
diff --git a/modules/viz/CMakeLists.txt b/modules/viz/CMakeLists.txt
index 89a9c3e098..3426e1dd26 100644
--- a/modules/viz/CMakeLists.txt
+++ b/modules/viz/CMakeLists.txt
@@ -3,7 +3,9 @@ if(NOT HAVE_VTK)
endif()
set(the_description "Viz")
-include(${VTK_USE_FILE})
+if(VTK_VERSION VERSION_LESS 8.90)
+ include(${VTK_USE_FILE})
+endif()
if(NOT BUILD_SHARED_LIBS)
# We observed conflict between builtin 3rdparty libraries and
diff --git a/modules/viz/src/precomp.hpp b/modules/viz/src/precomp.hpp
index f92fdb6ac2..4c4bf7c599 100644
--- a/modules/viz/src/precomp.hpp
+++ b/modules/viz/src/precomp.hpp
@@ -133,7 +133,8 @@
#include <vtkColorTransferFunction.h>
#include <vtkStreamingDemandDrivenPipeline.h>
#include <vtkLight.h>
-#include "vtkCallbackCommand.h"
+#include <vtkCallbackCommand.h>
+#include <vtkVersion.h>
#if !defined(_WIN32) || defined(__CYGWIN__)
# include <unistd.h> /* unlink */
@@ -149,6 +150,11 @@
#include "vtk/vtkTrajectorySource.h"
#include "vtk/vtkImageMatSource.h"
+#if VTK_MAJOR_VERSION >= 9
+typedef vtkIdType const * CellIterT;
+#else
+typedef vtkIdType * CellIterT;
+#endif
#include <opencv2/core.hpp>
#include <opencv2/viz.hpp>
diff --git a/modules/viz/src/types.cpp b/modules/viz/src/types.cpp
index 65571a192e..0e14477891 100644
--- a/modules/viz/src/types.cpp
+++ b/modules/viz/src/types.cpp
@@ -100,7 +100,8 @@ cv::viz::Mesh cv::viz::Mesh::load(const String& file, int type)
int* poly_ptr = mesh.polygons.ptr<int>();
polygons->InitTraversal();
- vtkIdType nr_cell_points, *cell_points;
+ vtkIdType nr_cell_points;
+ CellIterT cell_points;
while (polygons->GetNextCell(nr_cell_points, cell_points))
{
*poly_ptr++ = nr_cell_points;
diff --git a/modules/viz/src/vizimpl.cpp b/modules/viz/src/vizimpl.cpp
index 2c291c0569..2c7ce997a4 100644
--- a/modules/viz/src/vizimpl.cpp
+++ b/modules/viz/src/vizimpl.cpp
@@ -55,8 +55,17 @@ cv::viz::Viz3d::VizImpl::VizImpl(const String &name) : spin_once_state_(false),
// Create render window
window_ = vtkSmartPointer<vtkRenderWindow>::New();
- cv::Vec2i window_size = cv::Vec2i(window_->GetScreenSize()) / 2;
- window_->SetSize(window_size.val);
+ int * sz = window_->GetScreenSize();
+ if (sz)
+ {
+ cv::Vec2i window_size = cv::Vec2i(sz) / 2;
+ window_->SetSize(window_size.val);
+ }
+ else
+ {
+ int new_sz[2] = { 640, 480 };
+ window_->SetSize(new_sz);
+ }
window_->AddRenderer(renderer_);
// Create the interactor style
diff --git a/modules/viz/src/vtk/vtkOBJWriter.cpp b/modules/viz/src/vtk/vtkOBJWriter.cpp
index 296b6eb065..2e5764fc27 100644
--- a/modules/viz/src/vtk/vtkOBJWriter.cpp
+++ b/modules/viz/src/vtk/vtkOBJWriter.cpp
@@ -72,7 +72,7 @@ void cv::viz::vtkOBJWriter::WriteData()
}
vtkDebugMacro(<<"Opening vtk file for writing...");
- ostream *outfilep = new ofstream(this->FileName, ios::out);
+ std::ostream *outfilep = new std::ofstream(this->FileName, ios::out);
if (outfilep->fail())
{
vtkErrorMacro(<< "Unable to open file: "<< this->FileName);
@@ -127,7 +127,8 @@ void cv::viz::vtkOBJWriter::WriteData()
// write out verts if any
if (input->GetNumberOfVerts() > 0)
{
- vtkIdType npts = 0, *index = 0;
+ vtkIdType npts = 0;
+ CellIterT index = 0;
vtkCellArray *cells = input->GetVerts();
for (cells->InitTraversal(); cells->GetNextCell(npts, index); )
{
@@ -141,7 +142,8 @@ void cv::viz::vtkOBJWriter::WriteData()
// write out lines if any
if (input->GetNumberOfLines() > 0)
{
- vtkIdType npts = 0, *index = 0;
+ vtkIdType npts = 0;
+ CellIterT index = 0;
vtkCellArray *cells = input->GetLines();
for (cells->InitTraversal(); cells->GetNextCell(npts, index); )
{
@@ -162,7 +164,8 @@ void cv::viz::vtkOBJWriter::WriteData()
// write out polys if any
if (input->GetNumberOfPolys() > 0)
{
- vtkIdType npts = 0, *index = 0;
+ vtkIdType npts = 0;
+ CellIterT index = 0;
vtkCellArray *cells = input->GetPolys();
for (cells->InitTraversal(); cells->GetNextCell(npts, index); )
{
@@ -191,7 +194,8 @@ void cv::viz::vtkOBJWriter::WriteData()
// write out tstrips if any
if (input->GetNumberOfStrips() > 0)
{
- vtkIdType npts = 0, *index = 0;
+ vtkIdType npts = 0;
+ CellIterT index = 0;
vtkCellArray *cells = input->GetStrips();
for (cells->InitTraversal(); cells->GetNextCell(npts, index); )
{
diff --git a/modules/viz/src/vtk/vtkXYZReader.cpp b/modules/viz/src/vtk/vtkXYZReader.cpp
index 57726eae9b..3b9265fed6 100644
--- a/modules/viz/src/vtk/vtkXYZReader.cpp
+++ b/modules/viz/src/vtk/vtkXYZReader.cpp
@@ -77,7 +77,7 @@ int cv::viz::vtkXYZReader::RequestData(vtkInformation*, vtkInformationVector**,
}
// Open the input file.
- ifstream fin(this->FileName);
+ std::ifstream fin(this->FileName);
if(!fin)
{
vtkErrorMacro("Error opening file " << this->FileName);
diff --git a/modules/viz/src/vtk/vtkXYZWriter.cpp b/modules/viz/src/vtk/vtkXYZWriter.cpp
index cf95e3c6a0..56a26b38a0 100644
--- a/modules/viz/src/vtk/vtkXYZWriter.cpp
+++ b/modules/viz/src/vtk/vtkXYZWriter.cpp
@@ -69,7 +69,7 @@ void cv::viz::vtkXYZWriter::WriteData()
}
vtkDebugMacro(<<"Opening vtk file for writing...");
- ostream *outfilep = new ofstream(this->FileName, ios::out);
+ std::ostream *outfilep = new std::ofstream(this->FileName, ios::out);
if (outfilep->fail())
{
vtkErrorMacro(<< "Unable to open file: "<< this->FileName);
From 4281df7fe0090c03b6a40db44292ba6268239cbb Mon Sep 17 00:00:00 2001
From: Maksim Shabunin <maksim.shabunin@gmail.com>
Date: Tue, 2 Jun 2020 19:21:19 +0300
Subject: [PATCH 2/3] viz: tests are non-interactive now
---
modules/viz/test/test_tutorial2.cpp | 4 +--
modules/viz/test/test_tutorial3.cpp | 2 +-
modules/viz/test/test_viz3d.cpp | 2 +-
modules/viz/test/tests_simple.cpp | 56 ++++++++++++++---------------
4 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/modules/viz/test/test_tutorial2.cpp b/modules/viz/test/test_tutorial2.cpp
index 6b2972f0af..a4b5b99582 100644
--- a/modules/viz/test/test_tutorial2.cpp
+++ b/modules/viz/test/test_tutorial2.cpp
@@ -28,7 +28,7 @@ static void tutorial2()
/// Rodrigues vector
Vec3d rot_vec = Vec3d::all(0);
double translation_phase = 0.0, translation = 0.0;
- while(!myWindow.wasStopped())
+ for(unsigned num = 0; num < 50; ++num)
{
/* Rotation using rodrigues */
/// Rotate around (1,1,1)
@@ -45,7 +45,7 @@ static void tutorial2()
myWindow.setWidgetPose("Cube Widget", pose);
- myWindow.spinOnce(1, true);
+ myWindow.spinOnce(100, true);
}
}
diff --git a/modules/viz/test/test_tutorial3.cpp b/modules/viz/test/test_tutorial3.cpp
index 232130f0a6..32e33b1902 100644
--- a/modules/viz/test/test_tutorial3.cpp
+++ b/modules/viz/test/test_tutorial3.cpp
@@ -48,7 +48,7 @@ static void tutorial3(bool camera_pov)
myWindow.setViewerPose(camera_pose);
/// Start event loop.
- myWindow.spin();
+ myWindow.spinOnce(500, true);
}
TEST(Viz, tutorial3_global_view)
diff --git a/modules/viz/test/test_viz3d.cpp b/modules/viz/test/test_viz3d.cpp
index cdf8a00ad7..4ab05c3e0a 100644
--- a/modules/viz/test/test_viz3d.cpp
+++ b/modules/viz/test/test_viz3d.cpp
@@ -59,7 +59,7 @@ TEST(Viz_viz3d, DISABLED_develop)
//cv::Mat cloud = cv::viz::readCloud(get_dragon_ply_file_path());
//---->>>>> </to_test_in_future>
- viz.spin();
+ viz.spinOnce(500, true);
}
}} // namespace
diff --git a/modules/viz/test/tests_simple.cpp b/modules/viz/test/tests_simple.cpp
index 12d696dfba..5584483f4f 100644
--- a/modules/viz/test/tests_simple.cpp
+++ b/modules/viz/test/tests_simple.cpp
@@ -56,7 +56,7 @@ TEST(Viz, show_cloud_bluberry)
viz.showWidget("dragon", WCloud(dragon_cloud, Color::bluberry()), pose);
viz.showWidget("text2d", WText("Bluberry cloud", Point(20, 20), 20, Color::green()));
- viz.spin();
+ viz.spinOnce(500, true);
}
TEST(Viz, show_cloud_random_color)
@@ -73,7 +73,7 @@ TEST(Viz, show_cloud_random_color)
viz.showWidget("coosys", WCoordinateSystem());
viz.showWidget("dragon", WCloud(dragon_cloud, colors), pose);
viz.showWidget("text2d", WText("Random color cloud", Point(20, 20), 20, Color::green()));
- viz.spin();
+ viz.spinOnce(500, true);
}
TEST(Viz, show_cloud_masked)
@@ -91,7 +91,7 @@ TEST(Viz, show_cloud_masked)
viz.showWidget("coosys", WCoordinateSystem());
viz.showWidget("dragon", WCloud(dragon_cloud), pose);
viz.showWidget("text2d", WText("Nan masked cloud", Point(20, 20), 20, Color::green()));
- viz.spin();
+ viz.spinOnce(500, true);
}
TEST(Viz, show_cloud_collection)
@@ -109,7 +109,7 @@ TEST(Viz, show_cloud_collection)
viz.showWidget("coosys", WCoordinateSystem());
viz.showWidget("ccol", ccol);
viz.showWidget("text2d", WText("Cloud collection", Point(20, 20), 20, Color::green()));
- viz.spin();
+ viz.spinOnce(500, true);
}
TEST(Viz, show_painted_clouds)
@@ -124,7 +124,7 @@ TEST(Viz, show_painted_clouds)
viz.showWidget("cloud3", WPaintedCloud(cloud, Vec3d(0.0, 0.0, -1.0), Vec3d(0.0, 0.0, 1.0), Color::blue(), Color::red()));
viz.showWidget("arrow", WArrow(Vec3d(0.0, 1.0, -1.0), Vec3d(0.0, 1.0, 1.0), 0.009, Color::raspberry()));
viz.showWidget("text2d", WText("Painted clouds", Point(20, 20), 20, Color::green()));
- viz.spin();
+ viz.spinOnce(500, true);
}
TEST(Viz, show_mesh)
@@ -137,7 +137,7 @@ TEST(Viz, show_mesh)
viz.showWidget("coosys", WCoordinateSystem());
viz.showWidget("mesh", WMesh(mesh), pose);
viz.showWidget("text2d", WText("Just mesh", Point(20, 20), 20, Color::green()));
- viz.spin();
+ viz.spinOnce(500, true);
}
TEST(Viz, show_mesh_random_colors)
@@ -152,7 +152,7 @@ TEST(Viz, show_mesh_random_colors)
viz.showWidget("mesh", WMesh(mesh), pose);
viz.setRenderingProperty("mesh", SHADING, SHADING_PHONG);
viz.showWidget("text2d", WText("Random color mesh", Point(20, 20), 20, Color::green()));
- viz.spin();
+ viz.spinOnce(500, true);
}
TEST(Viz, show_widget_merger)
@@ -173,7 +173,7 @@ TEST(Viz, show_widget_merger)
viz.showWidget("coo", WCoordinateSystem());
viz.showWidget("merger", merger);
viz.showWidget("text2d", WText("Widget merger", Point(20, 20), 20, Color::green()));
- viz.spin();
+ viz.spinOnce(500, true);
}
TEST(Viz, show_textured_mesh)
@@ -210,7 +210,7 @@ TEST(Viz, show_textured_mesh)
viz.showWidget("mesh", WMesh(mesh));
viz.setRenderingProperty("mesh", SHADING, SHADING_PHONG);
viz.showWidget("text2d", WText("Textured mesh", Point(20, 20), 20, Color::green()));
- viz.spin();
+ viz.spinOnce(500, true);
}
TEST(Viz, show_polyline)
@@ -229,7 +229,7 @@ TEST(Viz, show_polyline)
viz.showWidget("polyline", WPolyLine(polyline, colors));
viz.showWidget("coosys", WCoordinateSystem());
viz.showWidget("text2d", WText("Polyline", Point(20, 20), 20, Color::green()));
- viz.spin();
+ viz.spinOnce(500, true);
}
TEST(Viz, show_sampled_normals)
@@ -244,7 +244,7 @@ TEST(Viz, show_sampled_normals)
viz.showWidget("normals", WCloudNormals(mesh.cloud, mesh.normals, 30, 0.1f, Color::green()), pose);
viz.setRenderingProperty("normals", LINE_WIDTH, 2.0);
viz.showWidget("text2d", WText("Cloud or mesh normals", Point(20, 20), 20, Color::green()));
- viz.spin();
+ viz.spinOnce(500, true);
}
TEST(Viz, show_cloud_shaded_by_normals)
@@ -260,7 +260,7 @@ TEST(Viz, show_cloud_shaded_by_normals)
Viz3d viz("show_cloud_shaded_by_normals");
viz.showWidget("cloud", cloud, pose);
viz.showWidget("text2d", WText("Cloud shaded by normals", Point(20, 20), 20, Color::green()));
- viz.spin();
+ viz.spinOnce(500, true);
}
TEST(Viz, show_trajectories)
@@ -287,15 +287,15 @@ TEST(Viz, show_trajectories)
viz.showWidget("text2d", WText("Different kinds of supported trajectories", Point(20, 20), 20, Color::green()));
int i = 0;
- while(!viz.wasStopped())
+ for(unsigned num = 0; num < 50; ++num)
{
double a = --i % 360;
Vec3d pose(sin(a * CV_PI/180), 0.7, cos(a * CV_PI/180));
viz.setViewerPose(makeCameraPose(pose * 7.5, Vec3d(0.0, 0.5, 0.0), Vec3d(0.0, 0.1, 0.0)));
- viz.spinOnce(20, true);
+ viz.spinOnce(100, true);
}
viz.resetCamera();
- viz.spin();
+ viz.spinOnce(500, true);
}
TEST(Viz, show_trajectory_reposition)
@@ -306,7 +306,7 @@ TEST(Viz, show_trajectory_reposition)
viz.showWidget("coos", WCoordinateSystem());
viz.showWidget("sub3", WTrajectory(Mat(path).rowRange(0, (int)path.size()/3), WTrajectory::BOTH, 0.2, Color::brown()), path.front().inv());
viz.showWidget("text2d", WText("Trajectory resposition to origin", Point(20, 20), 20, Color::green()));
- viz.spin();
+ viz.spinOnce(500, true);
}
TEST(Viz, show_camera_positions)
@@ -330,7 +330,7 @@ TEST(Viz, show_camera_positions)
viz.showWidget("pos3", WCameraPosition(0.75), poses[1]);
viz.showWidget("pos4", WCameraPosition(K, gray, 3, Color::indigo()), poses[1]);
viz.showWidget("text2d", WText("Camera positions with images", Point(20, 20), 20, Color::green()));
- viz.spin();
+ viz.spinOnce(500, true);
}
TEST(Viz, show_overlay_image)
@@ -353,16 +353,16 @@ TEST(Viz, show_overlay_image)
viz.showWidget("text2d", WText("Overlay images", Point(20, 20), 20, Color::green()));
int i = 0;
- while(!viz.wasStopped())
+ for(unsigned num = 0; num < 50; ++num)
{
double a = ++i % 360;
Vec3d pose(sin(a * CV_PI/180), 0.7, cos(a * CV_PI/180));
viz.setViewerPose(makeCameraPose(pose * 3, Vec3d(0.0, 0.5, 0.0), Vec3d(0.0, 0.1, 0.0)));
viz.getWidget("img1").cast<WImageOverlay>().setImage(lena * pow(sin(i*10*CV_PI/180) * 0.5 + 0.5, 1.0));
- viz.spinOnce(1, true);
+ viz.spinOnce(100, true);
}
viz.showWidget("text2d", WText("Overlay images (stopped)", Point(20, 20), 20, Color::green()));
- viz.spin();
+ viz.spinOnce(500, true);
}
@@ -376,7 +376,7 @@ TEST(Viz, show_image_method)
viz.showImage(lena, lena.size());
viz.spinOnce(1500, true);
- cv::viz::imshow("show_image_method", make_gray(lena)).spin();
+ cv::viz::imshow("show_image_method", make_gray(lena)).spinOnce(500, true);
}
TEST(Viz, show_image_3d)
@@ -398,13 +398,13 @@ TEST(Viz, show_image_3d)
viz.showWidget("text2d", WText("Images in 3D", Point(20, 20), 20, Color::green()));
int i = 0;
- while(!viz.wasStopped())
+ for(unsigned num = 0; num < 50; ++num)
{
viz.getWidget("img0").cast<WImage3D>().setImage(lena * pow(sin(i++*7.5*CV_PI/180) * 0.5 + 0.5, 1.0));
- viz.spinOnce(1, true);
+ viz.spinOnce(100, true);
}
viz.showWidget("text2d", WText("Images in 3D (stopped)", Point(20, 20), 20, Color::green()));
- viz.spin();
+ viz.spinOnce(500, true);
}
TEST(Viz, show_simple_widgets)
@@ -431,10 +431,10 @@ TEST(Viz, show_simple_widgets)
viz.showWidget("grid1", WGrid(Vec2i(7,7), Vec2d::all(0.75), Color::gray()), Affine3d().translate(Vec3d(0.0, 0.0, -1.0)));
- viz.spin();
+ viz.spinOnce(500, true);
viz.getWidget("text2d").cast<WText>().setText("Different simple widgets (updated)");
viz.getWidget("text3d").cast<WText3D>().setText("Updated text 3D");
- viz.spin();
+ viz.spinOnce(500, true);
}
TEST(Viz, show_follower)
@@ -446,9 +446,9 @@ TEST(Viz, show_follower)
viz.showWidget("t3d_2", WText3D("Simple 3D follower", Point3d(-0.5, -0.5, 0.5), 0.125, true, Color::green()));
viz.showWidget("text2d", WText("Follower: text always facing camera", Point(20, 20), 20, Color::green()));
viz.setBackgroundMeshLab();
- viz.spin();
+ viz.spinOnce(500, true);
viz.getWidget("t3d_2").cast<WText3D>().setText("Updated follower 3D");
- viz.spin();
+ viz.spinOnce(500, true);
}
}} // namespace
From f46c6cadbe751b2dbf60b34e85aaf575511e9794 Mon Sep 17 00:00:00 2001
From: Maksim Shabunin <maksim.shabunin@gmail.com>
Date: Tue, 2 Jun 2020 22:46:53 +0300
Subject: [PATCH 3/3] fixup! Added VTK 9 support
---
modules/viz/CMakeLists.txt | 12 ++++++++----
modules/viz/src/types.cpp | 1 +
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/modules/viz/CMakeLists.txt b/modules/viz/CMakeLists.txt
index 3426e1dd26..cd225960ce 100644
--- a/modules/viz/CMakeLists.txt
+++ b/modules/viz/CMakeLists.txt
@@ -3,9 +3,6 @@ if(NOT HAVE_VTK)
endif()
set(the_description "Viz")
-if(VTK_VERSION VERSION_LESS 8.90)
- include(${VTK_USE_FILE})
-endif()
if(NOT BUILD_SHARED_LIBS)
# We observed conflict between builtin 3rdparty libraries and
@@ -37,7 +34,14 @@ ocv_add_accuracy_tests()
ocv_add_perf_tests()
ocv_add_samples(opencv_imgproc opencv_calib3d opencv_features2d opencv_flann)
-ocv_target_link_libraries(${the_module} PRIVATE ${VTK_LIBRARIES})
+
+if (VTK_VERSION VERSION_LESS "8.90.0")
+ include(${VTK_USE_FILE})
+ ocv_target_link_libraries(${the_module} PRIVATE ${VTK_LIBRARIES})
+else ()
+ ocv_target_link_libraries(${the_module} PRIVATE ${VTK_LIBRARIES})
+ vtk_module_autoinit(TARGETS ${the_module} MODULES ${VTK_LIBRARIES})
+endif()
if(APPLE AND BUILD_opencv_viz)
ocv_target_link_libraries(${the_module} PRIVATE "-framework Cocoa")
diff --git a/modules/viz/src/types.cpp b/modules/viz/src/types.cpp
index 0e14477891..e9a470cf83 100644
--- a/modules/viz/src/types.cpp
+++ b/modules/viz/src/types.cpp
@@ -97,6 +97,7 @@ cv::viz::Mesh cv::viz::Mesh::load(const String& file, int type)
// Now handle the polygons
vtkSmartPointer<vtkCellArray> polygons = polydata->GetPolys();
mesh.polygons.create(1, polygons->GetSize(), CV_32SC1);
+ mesh.polygons = 0;
int* poly_ptr = mesh.polygons.ptr<int>();
polygons->InitTraversal();

1
dead.package Normal file
View File

@ -0,0 +1 @@
opencv package is retired on c9s for CS-362

View File

@ -1,11 +0,0 @@
--- ./cmake/OpenCVDetectOpenCL.cmake.orig 2019-05-14 00:35:41.373094435 +0100
+++ ./cmake/OpenCVDetectOpenCL.cmake 2019-05-14 00:35:50.833189862 +0100
@@ -5,7 +5,7 @@ if(APPLE)
else()
set(OPENCL_LIBRARY "" CACHE STRING "OpenCL library")
set(OPENCL_INCLUDE_DIR "${OpenCV_SOURCE_DIR}/3rdparty/include/opencl/1.2" CACHE PATH "OpenCL include directory")
- ocv_install_3rdparty_licenses(opencl-headers "${OpenCV_SOURCE_DIR}/3rdparty/include/opencl/LICENSE.txt")
+ #ocv_install_3rdparty_licenses(opencl-headers "${OpenCV_SOURCE_DIR}/3rdparty/include/opencl/LICENSE.txt")
endif()
mark_as_advanced(OPENCL_INCLUDE_DIR OPENCL_LIBRARY)

View File

@ -1,24 +0,0 @@
diff -up opencv-4.1.2/cmake/templates/OpenCVConfig.cmake.in.orig opencv-4.1.2/cmake/templates/OpenCVConfig.cmake.in
--- opencv-4.1.2/cmake/templates/OpenCVConfig.cmake.in.orig 2019-10-10 00:53:14.000000000 +0200
+++ opencv-4.1.2/cmake/templates/OpenCVConfig.cmake.in 2019-10-17 11:08:46.626400320 +0200
@@ -106,7 +106,7 @@ set(OpenCV_SHARED @BUILD_SHARED_LIBS@)
set(OpenCV_USE_MANGLED_PATHS @OpenCV_USE_MANGLED_PATHS_CONFIGCMAKE@)
set(OpenCV_LIB_COMPONENTS @OPENCV_MODULES_CONFIGCMAKE@)
-set(__OpenCV_INCLUDE_DIRS @OpenCV_INCLUDE_DIRS_CONFIGCMAKE@)
+set(__OpenCV_INCLUDE_DIRS @OpenCV_INCLUDE_DIRS_CONFIGCMAKE@ @OpenCV_INCLUDE_DIRS_CONFIGCMAKE@/opencv2)
set(OpenCV_INCLUDE_DIRS "")
foreach(d ${__OpenCV_INCLUDE_DIRS})
diff -up opencv-4.1.2/cmake/templates/opencv-XXX.pc.in.orig opencv-4.1.2/cmake/templates/opencv-XXX.pc.in
--- opencv-4.1.2/cmake/templates/opencv-XXX.pc.in.orig 2019-10-10 00:53:14.000000000 +0200
+++ opencv-4.1.2/cmake/templates/opencv-XXX.pc.in 2019-10-17 11:04:11.486014573 +0200
@@ -3,7 +3,7 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
-includedir_old=@includedir@/opencv
+includedir_old=@includedir@/opencv2
includedir_new=@includedir@
Name: OpenCV

View File

@ -1,31 +0,0 @@
#!/bin/bash
VERSION=4.5.1
wget -c https://github.com/opencv/opencv/archive/${VERSION}/opencv-${VERSION}.tar.gz
wget -c https://github.com/opencv/opencv_contrib/archive/${VERSION}/opencv_contrib-${VERSION}.tar.gz
wget -c https://github.com/opencv/opencv_extra/archive/${VERSION}/opencv_extra-${VERSION}.tar.gz
rm -rf opencv-${VERSION}/
tar xf opencv-${VERSION}.tar.gz
find opencv-${VERSION}/ -iname "*lena*" -exec rm {} ';' -print
find opencv-${VERSION}/ -iname "*lenna*" -exec rm {} ';' -print
rm -r opencv-${VERSION}/modules/xfeatures2d/
tar zcf opencv-clean-${VERSION}.tar.gz opencv-${VERSION}/
rm -r opencv-${VERSION}/
rm -rf opencv_contrib-${VERSION}/
tar xf opencv_contrib-${VERSION}.tar.gz
find opencv_contrib-${VERSION}/ -iname "*lena*" -exec rm {} ';' -print
find opencv_contrib-${VERSION}/ -iname "*lenna*" -exec rm {} ';' -print
rm -r opencv_contrib-${VERSION}/modules/xfeatures2d/
tar zcf opencv_contrib-clean-${VERSION}.tar.gz opencv_contrib-${VERSION}/
rm -r opencv_contrib-${VERSION}/
rm -rf opencv_extra-${VERSION}/
tar xf opencv_extra-${VERSION}.tar.gz
find opencv_extra-${VERSION} -iname "*lena*" -exec rm {} ';' -print
find opencv_extra-${VERSION} -iname "*lenna*" -exec rm {} ';' -print
find opencv_extra-${VERSION} \( -iname "len*.*" -o -iname "*lena*.png" -o -iname "*lena*.jpg" \) -exec rm {} ';' -print
tar zcf opencv_extra-clean-${VERSION}.tar.gz opencv_extra-${VERSION}/
rm -r opencv_extra-${VERSION}/

View File

@ -1,12 +0,0 @@
diff --git a/modules/gapi/test/gapi_async_test.cpp b/modules/gapi/test/gapi_async_test.cpp
index 66b8be4..aa0c9c7 100644
--- a/modules/gapi/test/gapi_async_test.cpp
+++ b/modules/gapi/test/gapi_async_test.cpp
@@ -13,6 +13,7 @@
#include <condition_variable>
#include <stdexcept>
+#include <thread>
namespace opencv_test
{

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +0,0 @@
SHA512 (opencv-clean-4.5.1.tar.gz) = b93df3e0bc9162b350d6e921a1a21eb351dab6f785b08be2cdd5a5b912565cafbe45d3125dbc66f0b7642ccffe00fb8eb199729e07d1426d4f0956f8c63e8653
SHA512 (opencv_contrib-clean-4.5.1.tar.gz) = f85e9e1ce08efa1eb31a4286387b77a9cb3466ec278db5db1a30318887fe905165559e56249e6aebaf4e33dee98063a790b230942ddf838df0e57a1535fbbf0b
SHA512 (opencv_extra-clean-4.5.1.tar.gz) = 2c260978c6aacfc699e7e47cd70dc04d819c891f6bc7cc4d554cb0a6ad1bc05917d2d0ec1099c5c7c28c5fdf84531a14726fcd9ae4aff76e720650ddd6a88a21
SHA512 (face_landmark_model.dat.xz) = 7558f29431bb9cad1f22ee067ad3ed41be8f68b865992eb7d3a5ce6b6b9e1d031cb03e33c3c149220ef8faebd0471703a8a3bbb06402bcc8ce76bd28317aa307
SHA512 (b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip) = f2994d5e92a2ae05cee6e153943afe151ce734ced6e06dcdb02dee9fed9336a7f1ea69661d9e033f1412fbb5e2a44a6e641662c85be5ba0604d0446abeabe836

View File

@ -1,98 +0,0 @@
# This xorg configuration file is meant to be used
# to start a dummy X11 server for graphical testing.
Section "ServerFlags"
Option "DontVTSwitch" "true"
Option "AllowMouseOpenFail" "true"
Option "PciForceNone" "true"
Option "AutoEnableDevices" "false"
Option "AutoAddDevices" "false"
EndSection
Section "InputDevice"
Identifier "dummy_mouse"
Option "CorePointer" "true"
Driver "void"
EndSection
Section "InputDevice"
Identifier "dummy_keyboard"
Option "CoreKeyboard" "true"
Driver "void"
EndSection
Section "Device"
Identifier "dummy_videocard"
Driver "dummy"
Option "ConstantDPI" "true"
#VideoRam 4096000
#VideoRam 256000
VideoRam 192000
EndSection
Section "Monitor"
Identifier "dummy_monitor"
HorizSync 5.0 - 1000.0
VertRefresh 5.0 - 200.0
#This can be used to get a specific DPI, but only for the default resolution:
#DisplaySize 508 317
#NOTE: the highest modes will not work without increasing the VideoRam
# for the dummy video card.
Modeline "32768x32768" 15226.50 32768 35800 39488 46208 32768 32771 32781 32953
Modeline "32768x16384" 7516.25 32768 35544 39192 45616 16384 16387 16397 16478
Modeline "16384x8192" 2101.93 16384 16416 24400 24432 8192 8390 8403 8602
Modeline "8192x4096" 424.46 8192 8224 9832 9864 4096 4195 4202 4301
Modeline "5496x1200" 199.13 5496 5528 6280 6312 1200 1228 1233 1261
Modeline "5280x1080" 169.96 5280 5312 5952 5984 1080 1105 1110 1135
Modeline "5280x1200" 191.40 5280 5312 6032 6064 1200 1228 1233 1261
Modeline "5120x3200" 199.75 5120 5152 5904 5936 3200 3277 3283 3361
Modeline "4800x1200" 64.42 4800 4832 5072 5104 1200 1229 1231 1261
Modeline "3840x2880" 133.43 3840 3872 4376 4408 2880 2950 2955 3025
Modeline "3840x2560" 116.93 3840 3872 4312 4344 2560 2622 2627 2689
Modeline "3840x2048" 91.45 3840 3872 4216 4248 2048 2097 2101 2151
Modeline "3840x1080" 100.38 3840 3848 4216 4592 1080 1081 1084 1093
Modeline "3600x1200" 106.06 3600 3632 3984 4368 1200 1201 1204 1214
Modeline "3288x1080" 39.76 3288 3320 3464 3496 1080 1106 1108 1135
Modeline "2048x2048" 49.47 2048 2080 2264 2296 2048 2097 2101 2151
Modeline "2048x1536" 80.06 2048 2104 2312 2576 1536 1537 1540 1554
Modeline "2560x1600" 47.12 2560 2592 2768 2800 1600 1639 1642 1681
Modeline "2560x1440" 42.12 2560 2592 2752 2784 1440 1475 1478 1513
Modeline "1920x1440" 69.47 1920 1960 2152 2384 1440 1441 1444 1457
Modeline "1920x1200" 26.28 1920 1952 2048 2080 1200 1229 1231 1261
Modeline "1920x1080" 23.53 1920 1952 2040 2072 1080 1106 1108 1135
Modeline "1680x1050" 20.08 1680 1712 1784 1816 1050 1075 1077 1103
Modeline "1600x1200" 22.04 1600 1632 1712 1744 1200 1229 1231 1261
Modeline "1600x900" 33.92 1600 1632 1760 1792 900 921 924 946
Modeline "1440x900" 30.66 1440 1472 1584 1616 900 921 924 946
ModeLine "1366x768" 72.00 1366 1414 1446 1494 768 771 777 803
Modeline "1280x1024" 31.50 1280 1312 1424 1456 1024 1048 1052 1076
Modeline "1280x800" 24.15 1280 1312 1400 1432 800 819 822 841
Modeline "1280x768" 23.11 1280 1312 1392 1424 768 786 789 807
Modeline "1360x768" 24.49 1360 1392 1480 1512 768 786 789 807
Modeline "1024x768" 18.71 1024 1056 1120 1152 768 786 789 807
Modeline "768x1024" 19.50 768 800 872 904 1024 1048 1052 1076
EndSection
Section "Screen"
Identifier "dummy_screen"
Device "dummy_videocard"
Monitor "dummy_monitor"
DefaultDepth 24
SubSectionSub "Display"
Viewport 0 0
Depth 24
#Modes "32768x32768" "32768x16384" "16384x8192" "8192x4096" "5120x3200" "3840x2880" "3840x2560" "3840x2048" "2048x2048" "2560x1600" "1920x1440" "1920x1200" "1920x1080" "1600x1200" "1680x1050" "1600x900" "1400x1050" "1440x900" "1280x1024" "1366x768" "1280x800" "1024x768"
Modes "5120x3200" "3840x2880" "3840x2560" "3840x2048" "2048x2048" "2560x1600" "1920x1440" "1920x1200" "1920x1080" "1600x1200" "1680x1050" "1600x900" "1400x1050" "1440x900" "1280x1024" "1366x768" "1280x800" "1024x768"
#Virtual 32000 32000
#Virtual 16384 8192
Virtual 8192 4096
#Virtual 5120 3200
EndSubSection
EndSection
Section "ServerLayout"
Identifier "dummy_layout"
Screen "dummy_screen"
InputDevice "dummy_mouse"
InputDevice "dummy_keyboard"
EndSection