Updated by Alexander Shishkov over 1 year ago
Under Python 2.6 the function PyrSegmentation [[PyrSegmentation]] produces an error message.
In r120: img_seg2 =cv.CreateImage(cv.GetSize(img_cvIpl),cv.IPL_DEPTH_8U, 3 )
In r118: cv.PyrMeanShiftFiltering(img_cvMat, img_seg1,5,15,4,(cv.CV_TERMCRIT_ITER | cv.CV_TERMCRIT_EPS, 10, 0.01))
In r119: img_seg1_cvIpl=cv.GetImage(img_seg1)
In r112: print img_seg1_cvIpl
<iplimage(nChannels=3 width=2178 height=3031 widthStep=6534 )>
In r113: print img_seg2
<iplimage(nChannels=3 width=2178 height=3031 widthStep=6536 )>
In r121: seq=cv.PyrSegmentation(img_cvIpl,img_seg2,storage, 4, 10, 10)
OpenCV [[OpenCV]] Error: Assertion failed ((icvPyrSegmentation8uC3R( src_data, src_step, dst_data, dst_step, src_size, CV_GAUSSIAN_5x5, comp, storage, level, thresh1, thresh2 )) >= 0) in cvPyrSegmentation, file /home/ange_pa/soft/other/OpenCV-2.3.0/modules/imgproc/src/pyrsegmentation.cpp, line 1872
------------------------------------------------------------
Traceback (most recent call last):
File "<ipython console>", line 1, in <module>
error: (icvPyrSegmentation8uC3R( src_data, src_step, dst_data, dst_step, src_size, CV_GAUSSIAN_5x5, comp, storage, level, thresh1, thresh2 )) >= 0
In r120: img_seg2 =cv.CreateImage(cv.GetSize(img_cvIpl),cv.IPL_DEPTH_8U, 3 )
In r118: cv.PyrMeanShiftFiltering(img_cvMat, img_seg1,5,15,4,(cv.CV_TERMCRIT_ITER | cv.CV_TERMCRIT_EPS, 10, 0.01))
In r119: img_seg1_cvIpl=cv.GetImage(img_seg1)
In r112: print img_seg1_cvIpl
<iplimage(nChannels=3 width=2178 height=3031 widthStep=6534 )>
In r113: print img_seg2
<iplimage(nChannels=3 width=2178 height=3031 widthStep=6536 )>
In r121: seq=cv.PyrSegmentation(img_cvIpl,img_seg2,storage, 4, 10, 10)
OpenCV [[OpenCV]] Error: Assertion failed ((icvPyrSegmentation8uC3R( src_data, src_step, dst_data, dst_step, src_size, CV_GAUSSIAN_5x5, comp, storage, level, thresh1, thresh2 )) >= 0) in cvPyrSegmentation, file /home/ange_pa/soft/other/OpenCV-2.3.0/modules/imgproc/src/pyrsegmentation.cpp, line 1872
------------------------------------------------------------
Traceback (most recent call last):
File "<ipython console>", line 1, in <module>
error: (icvPyrSegmentation8uC3R( src_data, src_step, dst_data, dst_step, src_size, CV_GAUSSIAN_5x5, comp, storage, level, thresh1, thresh2 )) >= 0