mirror of
https://github.com/ruby-opencv/ruby-opencv
synced 2023-03-27 23:22:12 -04:00
added error handling to some methods (2)
Added error handlings to the methods of following classes or modules -CvPoint2D32f -CvPoint3D32f -CvRect -CvScalar -CvSeq -CvSize -CvSize2D32f -CvSlice -CvSURFParams -CvSURFPoint -CvTermCriteria -CvTwoPoints -CvUtils -CvVideoWriter -GUI -IplConvKernel -IplImage -MouseEvent -OpenCV -Trackbar -Window
This commit is contained in:
parent
ea55e0d42e
commit
b3016fc68c
31 changed files with 407 additions and 245 deletions
|
@ -57,6 +57,14 @@ IPLIMAGE(VALUE object)
|
|||
return cvGetImage(ptr, &stub);
|
||||
}
|
||||
|
||||
inline IplImage*
|
||||
IPLIMAGE_WITH_CHECK(VALUE object)
|
||||
{
|
||||
if (!rb_obj_is_kind_of(object, cIplImage::rb_class()))
|
||||
raise_typeerror(object, cIplImage::rb_class());
|
||||
return IPLIMAGE(object);
|
||||
}
|
||||
|
||||
__NAMESPACE_END_OPENCV
|
||||
|
||||
#endif // RUBY_OPENCV_IPLIMAGE_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue