cv.Remap (dst.size() == mapx.size()) assertion question

asked 2013-01-01 16:51:31 -0500


I am trying


src = cv.CloneImage(R)
dst = cv.CloneImage(R)

print 'src', src, 'dest', dst, '\nmapx', map_x_32, 'mapy', map_y_32, 
cv.Remap(src, dst, map_x_32, map_y_32)


and get


error                                     Traceback (most recent call last)
<ipython-input-13-361117180010> in <module>()
     23 print 'src', src, 'dest', dst, '\nmapx', map_x_32, 'mapy', map_y_32,
---> 24 cv.Remap(src, dst, map_x_32, map_y_32)

error: src.type() == dst.type() && dst.size() == mapx.size()

 src <iplimage(nChannels=1 width=640 height=480 widthStep=640 )> dest <iplimage(nChannels=1 width=640 height=480 widthStep=640 )> 
mapxy <cvmat(type=42424005 32FC1 rows=640 cols=480 step=1920 )> mapa <cvmat(type=42424005 32FC1 rows=640 cols=480 step=1920 )>


I do not understand what (dst.size() == mapx.size()) is testing (especially since the mapx object will be very different when using convertmaps output), or why the assertion should fail. Could somebody help me out?



edit retag flag offensive close merge delete