mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
Merge pull request #21103 from OrestChura:oc/fix_1D_Mat_RMat_View_issue
[G-API] Fix issue of getting 1D Mat out of RMat::View * Fix issue of getting 1D Mat out of RMat::View - added test - fixed for standalone too (removed Assert(dims.empty())) * Fixed asVeiw() function for standalone * Put more detailed comment
This commit is contained in:
@@ -268,4 +268,13 @@ TEST_F(RMatViewCallbackTest, MagazineInteraction) {
|
||||
mag.slot<View>().erase(rc);
|
||||
EXPECT_EQ(1, callbackCalls);
|
||||
}
|
||||
|
||||
TEST(RMatView, Access1DMat) {
|
||||
cv::Mat m({1}, CV_32FC1);
|
||||
m.dims = 1;
|
||||
auto rmat = cv::make_rmat<cv::gimpl::RMatOnMat>(m);
|
||||
auto view = rmat.access(cv::RMat::Access::R);
|
||||
auto out = cv::gimpl::asMat(view);
|
||||
EXPECT_EQ(1, out.dims);
|
||||
}
|
||||
} // namespace opencv_test
|
||||
|
||||
Reference in New Issue
Block a user