kyamagu / paperdoll

Paper doll parser implementation from ICCV 2013
http://vision.is.tohoku.ac.jp/~kyamagu/research/paperdoll/
Other
83 stars 21 forks source link

Error with cv.warpAffine #10

Closed chengchunhsu closed 6 years ago

chengchunhsu commented 6 years ago

Hi, when I try to parse a new image with code on github page

load data/paperdoll_pipeline.mat config;
input_image = imread('/path/to/new_image.jpg');
input_sample = struct('image', imencode(input_image, 'jpg'));
result = feature_calculator.apply(config, input_sample)

I get this message from matlab:

[28-Jan-2018 03:19:28] Error:feature_calculator: 1 / 1
Error using cv.warpAffine
Attempt to execute SCRIPT warpAffine as a function:
/home/mclab/StyleMe/paperdoll/lib/mexopencv-2.4.11_bak/+cv/warpAffine.m

Error in normal_pose_calculator.apply>normalize_image (line 79)
  normalized_image = cv.warpAffine(im, transform, ...

Error in normal_pose_calculator.apply (line 44)
    [normal_image, transform] = normalize_image(image_data, ...

Error in feature_calculator.apply (line 25)
        sample = calculators{j}(config{j}, sample, varargin{:}, 'Encode', false);

result =

     []

I've tried to clone mexopencv 2.4.11 from lastest branch again, but it doesn't help... would you give me any possible solution so I can check?

I am using Matlab R2017b on Ubuntu 17.10 with OpenCV 2.4.11 thank you!

kyamagu commented 6 years ago

@chengchunhsu The error indicates mexopencv fails to compile. I would recommend you completely replace the mexopencv package with the latest version. Make sure to compile and see if that succeeds first.

chengchunhsu commented 6 years ago

@kyamagu Thanks! after i update mexopencv to the lastest version (with OpenCV 3.3.1) it works fine now.

btw in the middle i fixed "libopencv_imgproc.so.3.3 not found" problem with solution here: https://github.com/GaoHongchen/DIPDemoQt5/issues/1#issuecomment-284103343 post it here in case anyone need.