From 3c5d87cbae3cead4b9e73f2d6de5715d0a8648d1 Mon Sep 17 00:00:00 2001 From: "KUANG, Fangjun" Date: Sat, 11 Mar 2017 10:55:50 +0100 Subject: [PATCH 1/3] Add more information to the error code. --- modules/core/include/opencv2/core/base.hpp | 8 ++++---- modules/core/include/opencv2/core/types_c.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/core/include/opencv2/core/base.hpp b/modules/core/include/opencv2/core/base.hpp index b319df6f38..91720cc88a 100644 --- a/modules/core/include/opencv2/core/base.hpp +++ b/modules/core/include/opencv2/core/base.hpp @@ -79,18 +79,18 @@ enum Code { BadImageSize= -10, //!< image size is invalid BadOffset= -11, //!< offset is invalid BadDataPtr= -12, //!< - BadStep= -13, //!< + BadStep= -13, //!< image step is wrong BadModelOrChSeq= -14, //!< - BadNumChannels= -15, //!< + BadNumChannels= -15, //!< bad number of channels BadNumChannel1U= -16, //!< - BadDepth= -17, //!< + BadDepth= -17, //!< input image depth is not supported by function BadAlphaChannel= -18, //!< BadOrder= -19, //!< BadOrigin= -20, //!< BadAlign= -21, //!< BadCallBack= -22, //!< BadTileSize= -23, //!< - BadCOI= -24, //!< + BadCOI= -24, //!< input COI is not supported BadROISize= -25, //!< MaskIsTiled= -26, //!< StsNullPtr= -27, //!< null pointer diff --git a/modules/core/include/opencv2/core/types_c.h b/modules/core/include/opencv2/core/types_c.h index f82a59e812..b1eb75a3bb 100644 --- a/modules/core/include/opencv2/core/types_c.h +++ b/modules/core/include/opencv2/core/types_c.h @@ -130,18 +130,18 @@ enum { CV_BadImageSize= -10, /**< image size is invalid */ CV_BadOffset= -11, /**< offset is invalid */ CV_BadDataPtr= -12, /**/ - CV_BadStep= -13, /**/ + CV_BadStep= -13, /**< image step is wrong */ CV_BadModelOrChSeq= -14, /**/ - CV_BadNumChannels= -15, /**/ + CV_BadNumChannels= -15, /**< bad number of channels */ CV_BadNumChannel1U= -16, /**/ - CV_BadDepth= -17, /**/ + CV_BadDepth= -17, /**< input image depth is not supported by function */ CV_BadAlphaChannel= -18, /**/ CV_BadOrder= -19, /**/ CV_BadOrigin= -20, /**/ CV_BadAlign= -21, /**/ CV_BadCallBack= -22, /**/ CV_BadTileSize= -23, /**/ - CV_BadCOI= -24, /**/ + CV_BadCOI= -24, /**< input COI is not supported */ CV_BadROISize= -25, /**/ CV_MaskIsTiled= -26, /**/ CV_StsNullPtr= -27, /**< null pointer */ From f82d64c6e526488cd75545cf6a0d5dcfc8da17c9 Mon Sep 17 00:00:00 2001 From: Fangjun KUANG Date: Thu, 23 Mar 2017 14:34:24 +0100 Subject: [PATCH 2/3] Add more info to the error code. --- modules/core/include/opencv2/core/base.hpp | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/modules/core/include/opencv2/core/base.hpp b/modules/core/include/opencv2/core/base.hpp index 91720cc88a..04e28b2c8f 100644 --- a/modules/core/include/opencv2/core/base.hpp +++ b/modules/core/include/opencv2/core/base.hpp @@ -73,30 +73,30 @@ enum Code { StsNoMem= -4, //!< insufficient memory StsBadArg= -5, //!< function arg/param is bad StsBadFunc= -6, //!< unsupported function - StsNoConv= -7, //!< iter. didn't converge + StsNoConv= -7, //!< iteration didn't converge StsAutoTrace= -8, //!< tracing HeaderIsNull= -9, //!< image header is NULL BadImageSize= -10, //!< image size is invalid BadOffset= -11, //!< offset is invalid BadDataPtr= -12, //!< - BadStep= -13, //!< image step is wrong + BadStep= -13, //!< image step is wrong, this may happen for a non-continuous matrix. BadModelOrChSeq= -14, //!< - BadNumChannels= -15, //!< bad number of channels + BadNumChannels= -15, //!< bad number of channels, for example, some functions accept only single channel matrices. BadNumChannel1U= -16, //!< - BadDepth= -17, //!< input image depth is not supported by function + BadDepth= -17, //!< input image depth is not supported by the function BadAlphaChannel= -18, //!< - BadOrder= -19, //!< - BadOrigin= -20, //!< - BadAlign= -21, //!< + BadOrder= -19, //!< number of dimensions is out of range + BadOrigin= -20, //!< incorrect input origin + BadAlign= -21, //!< incorrect input align BadCallBack= -22, //!< BadTileSize= -23, //!< BadCOI= -24, //!< input COI is not supported - BadROISize= -25, //!< + BadROISize= -25, //!< incorrect input roi MaskIsTiled= -26, //!< StsNullPtr= -27, //!< null pointer StsVecLengthErr= -28, //!< incorrect vector length - StsFilterStructContentErr= -29, //!< incorr. filter structure content - StsKernelStructContentErr= -30, //!< incorr. transform kernel content + StsFilterStructContentErr= -29, //!< incorrect filter structure content + StsKernelStructContentErr= -30, //!< incorrect transform kernel content StsFilterOffsetErr= -31, //!< incorrect filter offset value StsBadSize= -201, //!< the input/output structure size is incorrect StsDivByZero= -202, //!< division by zero @@ -113,13 +113,13 @@ enum Code { StsNotImplemented= -213, //!< the requested function/feature is not implemented StsBadMemBlock= -214, //!< an allocated block has been corrupted StsAssert= -215, //!< assertion failed - GpuNotSupported= -216, - GpuApiCallError= -217, - OpenGlNotSupported= -218, - OpenGlApiCallError= -219, - OpenCLApiCallError= -220, + GpuNotSupported= -216, //!< no CUDA support + GpuApiCallError= -217, //!< GPU API call error + OpenGlNotSupported= -218, //!< no OpenGL support + OpenGlApiCallError= -219, //!< OpenGL API call error + OpenCLApiCallError= -220, //!< OpenCL API call error OpenCLDoubleNotSupported= -221, - OpenCLInitError= -222, + OpenCLInitError= -222, //!< OpenCL initialization error OpenCLNoAMDBlasFft= -223 }; } //Error From da94d857891625c3b0a7818d33a298bea54012e1 Mon Sep 17 00:00:00 2001 From: Fangjun KUANG Date: Thu, 23 Mar 2017 14:40:34 +0100 Subject: [PATCH 3/3] add more info to the error code. --- modules/core/include/opencv2/core/types_c.h | 34 ++++++++++----------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/modules/core/include/opencv2/core/types_c.h b/modules/core/include/opencv2/core/types_c.h index b1eb75a3bb..f2f0512720 100644 --- a/modules/core/include/opencv2/core/types_c.h +++ b/modules/core/include/opencv2/core/types_c.h @@ -130,24 +130,24 @@ enum { CV_BadImageSize= -10, /**< image size is invalid */ CV_BadOffset= -11, /**< offset is invalid */ CV_BadDataPtr= -12, /**/ - CV_BadStep= -13, /**< image step is wrong */ + CV_BadStep= -13, /**< image step is wrong, this may happen for a non-continuous matrix */ CV_BadModelOrChSeq= -14, /**/ - CV_BadNumChannels= -15, /**< bad number of channels */ + CV_BadNumChannels= -15, /**< bad number of channels, for example, some functions accept only single channel matrices */ CV_BadNumChannel1U= -16, /**/ - CV_BadDepth= -17, /**< input image depth is not supported by function */ + CV_BadDepth= -17, /**< input image depth is not supported by the function */ CV_BadAlphaChannel= -18, /**/ - CV_BadOrder= -19, /**/ - CV_BadOrigin= -20, /**/ - CV_BadAlign= -21, /**/ + CV_BadOrder= -19, /**< number of dimensions is out of range */ + CV_BadOrigin= -20, /**< incorrect input origin */ + CV_BadAlign= -21, /**< incorrect input align */ CV_BadCallBack= -22, /**/ CV_BadTileSize= -23, /**/ - CV_BadCOI= -24, /**< input COI is not supported */ - CV_BadROISize= -25, /**/ + CV_BadCOI= -24, /**< input COI is not supported */ + CV_BadROISize= -25, /**< incorrect input roi */ CV_MaskIsTiled= -26, /**/ CV_StsNullPtr= -27, /**< null pointer */ CV_StsVecLengthErr= -28, /**< incorrect vector length */ - CV_StsFilterStructContentErr= -29, /**< incorr. filter structure content */ - CV_StsKernelStructContentErr= -30, /**< incorr. transform kernel content */ + CV_StsFilterStructContentErr= -29, /**< incorrect filter structure content */ + CV_StsKernelStructContentErr= -30, /**< incorrect transform kernel content */ CV_StsFilterOffsetErr= -31, /**< incorrect filter offset value */ CV_StsBadSize= -201, /**< the input/output structure size is incorrect */ CV_StsDivByZero= -202, /**< division by zero */ @@ -163,14 +163,14 @@ enum { CV_StsParseError= -212, /**< invalid syntax/structure of the parsed file */ CV_StsNotImplemented= -213, /**< the requested function/feature is not implemented */ CV_StsBadMemBlock= -214, /**< an allocated block has been corrupted */ - CV_StsAssert= -215, /**< assertion failed */ - CV_GpuNotSupported= -216, - CV_GpuApiCallError= -217, - CV_OpenGlNotSupported= -218, - CV_OpenGlApiCallError= -219, - CV_OpenCLApiCallError= -220, + CV_StsAssert= -215, /**< assertion failed */ + CV_GpuNotSupported= -216, /**< no CUDA support */ + CV_GpuApiCallError= -217, /**< GPU API call error */ + CV_OpenGlNotSupported= -218, /**< no OpenGL support */ + CV_OpenGlApiCallError= -219, /**< OpenGL API call error */ + CV_OpenCLApiCallError= -220, /**< OpenCL API call error */ CV_OpenCLDoubleNotSupported= -221, - CV_OpenCLInitError= -222, + CV_OpenCLInitError= -222, /**< OpenCL initialization error */ CV_OpenCLNoAMDBlasFft= -223 };