Skip to content

Commit 3bf5d34

Browse files
committed
Callib3d 4channel image detection
3.2 version doesn't support 4 channel color image detections, unlike 3.1. Now, we don't call CV_Error() if 4 channel image is given. resolve opencv#8326
1 parent 6f39f9a commit 3bf5d34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/calib3d/src/calibinit.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ int cvFindChessboardCorners( const void* arr, CvSize pattern_size,
442442

443443
Mat img = cvarrToMat((CvMat*)arr).clone();
444444

445-
if( img.depth() != CV_8U || (img.channels() != 1 && img.channels() != 3) )
445+
if( img.depth() != CV_8U || (img.channels() != 1 && img.channels() != 3 && img.channels() != 4) )
446446
CV_Error( CV_StsUnsupportedFormat, "Only 8-bit grayscale or color images are supported" );
447447

448448
if( pattern_size.width <= 2 || pattern_size.height <= 2 )

0 commit comments

Comments
 (0)