From dee619b628e86d187bbe7a55b5fe6c7bfbb8b64d Mon Sep 17 00:00:00 2001 From: Stefania Hergane Date: Wed, 10 Dec 2025 16:48:35 +0200 Subject: [PATCH] Merge pull request #28127 from StefaniaHergane:hs/deprecated_ov_element_undefined MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update deprecated ov::element::undefined #28127 ### Summary Fixing OpenCV build error below. Relates to OpenVINO 2026.0 updates on `ov::element::undefined` (https://github.com/openvinotoolkit/openvino/pull/32573) - replaced by `ov::element::dynamic`. ``` /home/jenkins/agent/workspace/openVINO-builder/opencv_source/opencv-opencv-f627368/modules/gapi/src/backends/ov/govbackend.cpp [2025-12-03T21:25:54.540Z] /home/jenkins/agent/workspace/openVINO-builder/opencv_source/opencv-opencv-f627368/modules/gapi/src/backends/ov/govbackend.cpp: In function ���ov::element::Type toOV(int)���: [2025-12-03T21:25:54.540Z] /home/jenkins/agent/workspace/openVINO-builder/opencv_source/opencv-opencv-f627368/modules/gapi/src/backends/ov/govbackend.cpp:114:25: error: ���undefined��� is not a member of ���ov::element��� [2025-12-03T21:25:54.540Z] 114 | return ov::element::undefined; ... /home/jenkins/agent/workspace/openVINO-builder/opencv_source/opencv-opencv-f627368/modules/gapi/test/infer/gapi_infer_ov_tests.cpp [2025-12-03T21:26:19.642Z] /home/jenkins/agent/workspace/openVINO-builder/opencv_source/opencv-opencv-f627368/modules/gapi/test/infer/gapi_infer_ov_tests.cpp: In function ���ov::element::Type opencv_test::toOV(int)���: [2025-12-03T21:26:19.642Z] /home/jenkins/agent/workspace/openVINO-builder/opencv_source/opencv-opencv-f627368/modules/gapi/test/infer/gapi_infer_ov_tests.cpp:832:25: error: ���undefined��� is not a member of ���ov::element��� [2025-12-03T21:26:19.642Z] 832 | return ov::element::undefined; ``` ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [ ] The PR is proposed to the proper branch - [ ] There is a reference to the original bug report and related work - [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [ ] The feature is well documented and sample code can be built with the project CMake --- modules/gapi/src/backends/ov/govbackend.cpp | 2 +- modules/gapi/test/infer/gapi_infer_ov_tests.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/gapi/src/backends/ov/govbackend.cpp b/modules/gapi/src/backends/ov/govbackend.cpp index 6a787c03e9..15c216d716 100644 --- a/modules/gapi/src/backends/ov/govbackend.cpp +++ b/modules/gapi/src/backends/ov/govbackend.cpp @@ -111,7 +111,7 @@ static ov::element::Type toOV(int depth) { case CV_16F: return ov::element::f16; default: GAPI_Error("OV Backend: Unsupported data type"); } - return ov::element::undefined; + return ov::element::dynamic; } static ov::preprocess::ResizeAlgorithm toOVInterp(int interpolation) { diff --git a/modules/gapi/test/infer/gapi_infer_ov_tests.cpp b/modules/gapi/test/infer/gapi_infer_ov_tests.cpp index 85df0b24da..31fb3dd65a 100644 --- a/modules/gapi/test/infer/gapi_infer_ov_tests.cpp +++ b/modules/gapi/test/infer/gapi_infer_ov_tests.cpp @@ -829,7 +829,7 @@ static ov::element::Type toOV(int depth) { case CV_16F: return ov::element::f16; default: GAPI_Error("OV Backend: Unsupported data type"); } - return ov::element::undefined; + return ov::element::dynamic; } struct TestMeanScaleOV : public ::testing::TestWithParam{