shimat / opencvsharp

OpenCV wrapper for .NET

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parameters for EstimateTransform(IEnumerable<Mat> images, Rect[][] rois)

pochetl opened this issue · comments

Summary of your issue

I can't find an appropriate size for a Rect[][] to pass to estimateTransform so I can see where each source image ends up in the final image -

VS2019 c#

What did you do when you faced the problem?

I have tried passing a Rect[][] of all sizes from 1-255 for each part of the array and continue to receive "Unknown/unsupported array type" exceptions

Example code:

//various attempts at making a jagged Rect[][]
OpenCvSharp.Rect[][] panoReccts = new OpenCvSharp.Rect[5][];
for (int i = 0; i < 5; i++)
{
panoReccts[i] = new OpenCvSharp.Rect[5];
for(int j=0;j<5;j++)
{
panoReccts[i][j]=new OpenCvSharp.Rect(0,0,0,0);
}
}
...
</leaving out building stitchable input array - works fine without using panoRects)
...
Stitcher.Status transformStatus = stitcherPanorama.EstimateTransform(stitchable, panoRects);

Output:

"Unknown/unsupported array type" exceptions

What did you intend to be?

Expected pano output mat (works fine without passing in ROI[][]) and exception about array