Browse Source

Some bug fixes.

UWP10
Canming Huang 11 years ago
parent
commit
3a9af8d14d
  1. 2
      Emgu.CV.Extern/calib3d/calib3d_c.cpp
  2. 2
      Emgu.CV.Extern/calib3d/calib3d_c.h
  3. 2
      Emgu.CV.Extern/core/core_c.cpp
  4. 2
      Emgu.CV.Extern/core/core_c_extra.h
  5. 5
      Emgu.CV.Extern/core/umat_c.cpp
  6. 1
      Emgu.CV.Extern/core/umat_c.h
  7. 5
      Emgu.CV/Mat.cs
  8. 15
      Emgu.CV/UMat.cs

2
Emgu.CV.Extern/calib3d/calib3d_c.cpp

@ -97,7 +97,7 @@ bool cveFindCirclesGrid(cv::_InputArray* image, CvSize* patternSize, cv::_Output
return cv::findCirclesGrid(*image, *patternSize, *centers, flags, ptr);
}
void cveTriangulatePointe(cv::_InputArray* projMat1, cv::_InputArray* projMat2, cv::_InputArray* projPoints1, cv::_InputArray* projPoints2, cv::_OutputArray* points4D)
void cveTriangulatePoints(cv::_InputArray* projMat1, cv::_InputArray* projMat2, cv::_InputArray* projPoints1, cv::_InputArray* projPoints2, cv::_OutputArray* points4D)
{
cv::triangulatePoints(*projMat1, *projMat2, *projPoints1, *projPoints2, *points4D);
}

2
Emgu.CV.Extern/calib3d/calib3d_c.h

@ -38,7 +38,7 @@ CVAPI(bool) getHomographyMatrixFromMatchedFeatures(std::vector<cv::KeyPoint>* mo
//Find circles grid
CVAPI(bool) cveFindCirclesGrid(cv::_InputArray* image, CvSize* patternSize, cv::_OutputArray* centers, int flags, cv::FeatureDetector* blobDetector);
CVAPI(void) cveTriangulatePointe(cv::_InputArray* projMat1, cv::_InputArray* projMat2, cv::_InputArray* projPoints1, cv::_InputArray* projPoints2, cv::_OutputArray* points4D);
CVAPI(void) cveTriangulatePoints(cv::_InputArray* projMat1, cv::_InputArray* projMat2, cv::_InputArray* projPoints1, cv::_InputArray* projPoints2, cv::_OutputArray* points4D);
CVAPI(void) cveCorrectMatches(cv::_InputArray* f, cv::_InputArray* points1, cv::_InputArray* points2, cv::_OutputArray* newPoints1, cv::_OutputArray* newPoints2);

2
Emgu.CV.Extern/core/core_c.cpp

@ -415,7 +415,7 @@ void cveFillConvexPoly(cv::_InputOutputArray* img, cv::_InputArray* points, cons
cv::fillConvexPoly(*img, *points, *color, lineType, shift);
}
void cvefillPoly(cv::_InputOutputArray* img, cv::_InputArray* pts, const CvScalar* color, int lineType, int shift, CvPoint* offset)
void cveFillPoly(cv::_InputOutputArray* img, cv::_InputArray* pts, const CvScalar* color, int lineType, int shift, CvPoint* offset)
{
cv::fillPoly(*img, *pts, *color, lineType, shift, *offset);
}

2
Emgu.CV.Extern/core/core_c_extra.h

@ -127,7 +127,7 @@ CVAPI(void) cvePutText(cv::_InputOutputArray* img, const char* text, CvPoint* or
CVAPI(void) cveFillConvexPoly(cv::_InputOutputArray* img, cv::_InputArray* points, const CvScalar* color, int lineType, int shift);
CVAPI(void) cvefillPoly(cv::_InputOutputArray* img, cv::_InputArray* pts, const CvScalar* color, int lineType, int shift, CvPoint* offset);
CVAPI(void) cveFillPoly(cv::_InputOutputArray* img, cv::_InputArray* pts, const CvScalar* color, int lineType, int shift, CvPoint* offset);
CVAPI(void) cvePolylines(cv::_InputOutputArray* img, cv::_InputArray* pts,
bool isClosed, const CvScalar* color,

5
Emgu.CV.Extern/core/umat_c.cpp

@ -89,6 +89,11 @@ cv::Mat* cvUMatGetMat(cv::UMat* mat, int access)
return result;
}
void cvUMatConvertTo( cv::UMat* mat, cv::_OutputArray* out, int rtype, double alpha, double beta )
{
mat->convertTo(*out, rtype, alpha, beta);
}
cv::UMat* cvUMatReshape(cv::UMat* mat, int cn, int rows)
{
cv::UMat* result = new cv::UMat();

1
Emgu.CV.Extern/core/umat_c.h

@ -26,5 +26,6 @@ CVAPI(int) cvUMatGetDepth(cv::UMat* mat);
CVAPI(bool) cvUMatIsEmpty(cv::UMat* mat);
CVAPI(void) cvUMatSetTo(cv::UMat* mat, cv::_InputArray* value, cv::_InputArray* mask);
CVAPI(cv::Mat*) cvUMatGetMat(cv::UMat* mat, int access);
CVAPI(void) cvUMatConvertTo( cv::UMat* mat, cv::_OutputArray* out, int rtype, double alpha, double beta );
CVAPI(cv::UMat*) cvUMatReshape(cv::UMat* mat, int cn, int rows);
#endif

5
Emgu.CV/Mat.cs

@ -539,6 +539,11 @@ namespace Emgu.CV
CvInvoke.MinMax(this, out minValues, out maxValues, out minLocations, out maxLocations);
}
/// <summary>
/// Create a Mat object with data pointed towards the specific row of the original matrix
/// </summary>
/// <param name="i">The row number</param>
/// <returns>A Mat object with data pointed towards the specific row of the original matrix</returns>
public Mat GetRow(int i)
{
return new Mat(this, new Rectangle(new Point(i, 0), new Size(this.Size.Width, 1)));

15
Emgu.CV/UMat.cs

@ -304,6 +304,18 @@ namespace Emgu.CV
CvInvoke.MinMax(this, out minValues, out maxValues, out minLocations, out maxLocations);
}
/// <summary>
/// Converts an array to another data type with optional scaling.
/// </summary>
/// <param name="m">Output matrix; if it does not have a proper size or type before the operation, it is reallocated.</param>
/// <param name="rtype">Desired output matrix type or, rather, the depth since the number of channels are the same as the input has; if rtype is negative, the output matrix will have the same type as the input.</param>
/// <param name="alpha">Optional scale factor.</param>
/// <param name="beta">Optional delta added to the scaled values.</param>
public void ConvertTo(IOutputArray m, CvEnum.DepthType rtype, double alpha = 1.0, double beta = 0.0)
{
UMatInvoke.cvUMatConvertTo(Ptr, m.OutputArrayPtr, rtype, alpha, beta);
}
/*
/// <summary>
/// Convert this Mat to UMat
@ -428,6 +440,9 @@ namespace Emgu.CV
[DllImport(CvInvoke.EXTERN_LIBRARY, CallingConvention = CvInvoke.CvCallingConvention)]
internal extern static IntPtr cvUMatGetMat(IntPtr umat, CvEnum.AccessType access);
[DllImport(CvInvoke.EXTERN_LIBRARY, CallingConvention = CvInvoke.CvCallingConvention)]
internal extern static void cvUMatConvertTo(IntPtr umat, IntPtr outArray, CvEnum.DepthType rtype, double alpha, double beta);
[DllImport(CvInvoke.EXTERN_LIBRARY, CallingConvention = CvInvoke.CvCallingConvention)]
internal extern static IntPtr cvUMatReshape(IntPtr mat, int cn, int rows);
}

Loading…
Cancel
Save