fix swapped canvas width and height
This commit is contained in:
parent
0609cdb4cd
commit
7bd0a9fe66
1 changed files with 3 additions and 3 deletions
|
|
@ -101,7 +101,7 @@ public class ImageGenerator
|
|||
var globalRoI = GenerateGlobalRoI(requestBody.CropOffset, requestBody.CropSize, canvasRect.Width,
|
||||
canvasRect.Height);
|
||||
|
||||
Mat canvas = new Mat(globalRoI.Width, globalRoI.Height, a1Mat.Type());
|
||||
Mat canvas = new Mat(globalRoI.Height, globalRoI.Width, a1Mat.Type());
|
||||
|
||||
Parallel.ForEach(matrix, item =>
|
||||
{
|
||||
|
|
@ -193,8 +193,8 @@ public class ImageGenerator
|
|||
|
||||
private Rect GenerateInitialRectCanvas(Mat reference, int rowCount, int colCount)
|
||||
{
|
||||
int width = reference.Rows * rowCount;
|
||||
int height = reference.Cols * colCount;
|
||||
int width = reference.Width * colCount;
|
||||
int height = reference.Height * rowCount;
|
||||
return new Rect(0, 0, width, height);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue