fengju514 / Face-Pose-Net

Estimate 3D face pose (6DoF) or 11 parameters of 3x4 projection matrix by a Convolutional Neural Network
501 stars 109 forks source link

Remap issue, the mapping to too big #26

Open ihmc3jn09hk opened 6 years ago

ihmc3jn09hk commented 6 years ago

Hi Fengju, I got problem running the code. The following error shown during testing. I have checked the variables 'prj' in function warpImg. I used temp. variable to check the problem as following. The size of the elements, say [0] and [1], in the array are the same 50176. How could the problem be solved???

tmpX = np.squeeze(np.asarray( prj[0,:] )).astype('float32') tmpY = np.squeeze(np.asarray( prj[1,:] )).astype('float32')

File "main_fpn.py", line 50, in <module> renderer_fpn.render_fpn(outpu_proc, output_pose_db, output_render) File "E:\PROJECTs\FaceReconstruction\FacePose\Face-Pose-Net-master\renderer_fpn.py", line 88, in render_fpn model3D.ref_U, eyemask, model3D.facemask, opts) File "E:\PROJECTs\FaceReconstruction\FacePose\Face-Pose-Net-master/face_renderer\renderer.py", line 120, in render frontal_raw = warpImg(img, ref_U.shape[0], ref_U.shape[1], prj_jnt, ind_jnt) File "E:\PROJECTs\FaceReconstruction\FacePose\Face-Pose-Net-master/face_renderer\renderer.py", line 32, in warpImg pixels = cv2.remap(img, tmpX, tmpY, cv2.INTER_CUBIC) cv2.error: OpenCV(3.4.2) D:\Build\OpenCV\opencv-3.4.2\modules\imgproc\src\imgwarp.cpp:1728: error: (-215:Assertion failed) dst.cols < 32767 && dst.rows < 32767 && src.cols < 32767 && src.rows < 32767 in function 'cv::remap'

fengju514 commented 6 years ago

Which version of OpenCV did you use?

HWT-WalterHu commented 5 years ago

I got the same problem. Using opencv 3.4.1.

Symbiomatrix commented 2 years ago

See issue #23.