Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not LoadSamples #28

Open
TrueBlue10 opened this issue Mar 10, 2016 · 4 comments
Open

Could not LoadSamples #28

TrueBlue10 opened this issue Mar 10, 2016 · 4 comments

Comments

@TrueBlue10
Copy link

Hello @jwyang ,
I'm trying to run your matlab code on my machine now. But I met some issue when I tried to load the image in.
in the test_model file, after I ran the code "te_data = loadsamples(imgpathlistfile, 1);"
the data returned is always "Empty cell array: 0-by-1";
Could you please provide me some information on it?
Thank you

@jwyang
Copy link
Owner

jwyang commented Mar 11, 2016

Hi, @TrueBlue10

I think it could be caused by the incorrect format of 'imgpathlistfile'? It should be cell data, looks like {'lfw'} or so. Did you use the same format?

@TrueBlue10
Copy link
Author

@jwyang
Thanks for your information.I'm using {'afw'} as my testing database. Because of some unknown reason, the command Data = cell(length(imgpathlist), 1); always create an 0*1 cell.
I split the code into lgh = length(imgpathlist); Data = cell(lgh, 1);
it could create a 377 * 1 cell now.

But new error comes. when I run img = im2uint8(imread(imgpathlist{i}));the im2uint8 function always give me an exceptions says that 未定义与 'uint8' 类型的输入参数相对应的函数 'im2uint8'。(undefined function for im2uint8 using uint8 as variable)(loadsamples (line 22)).
I thought this was because imread(imgpathlist{i}) was already in uint8. so I just remove im2uint8 function. But it will give me an error afterwards shows 未定义与 'double' 类型的输入参数相对应的函数 'fitgeotrans'。 in code Data{i}.tf2meanshape{1} = fitgeotrans(bsxfun(@minus, Data{i}.intermediate_shapes{1}(1:end,:, 1), mean(Data{i}.intermediate_shapes{1}(1:end,:, 1))), ... (test_model (line 114))which means the data I load is in double format.
It's really confused to me now. My word is a little messy. Please let me know if I didnt explain myself clearly.
Really appreciate for your help.

@jwyang
Copy link
Owner

jwyang commented Mar 12, 2016

Hi, @TrueBlue10 ,

as mentioned in the readme file, *fitgeotrans * command may not be supported for soime versions of matlab, I think you may need to do following alternations:

fitgeotrans -> cp2tform, transformPointsForward -> tformfwd

@TrueBlue10
Copy link
Author

Hello @jwyang,
Unfortunately, changing the function didnt solve the problem. I'm using Matlab R2015b. I'll keep digging what happen on my machine.
thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants