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

No type "Moments" in namespace "cv" #2

Closed
SPike666 opened this issue Jul 28, 2015 · 4 comments
Closed

No type "Moments" in namespace "cv" #2

SPike666 opened this issue Jul 28, 2015 · 4 comments

Comments

@SPike666
Copy link

Facing problems with building your project.
After adding opencv2.framework(made from opencv 3.0.0) into project and running build it interrupts with errors like:
"~/projects/opencv2.framework/Headers/imgproc/types_c.h:405:21: No type named 'Moments' in namespace 'cv'; did you mean 'CvMoments'?", but replacing it to 'CvMoments' didn't helped.

also I get
Semantic Issues like "~/projects/opencv2.framework/Headers/imgproc/imgproc_c.h:994:42: Redefinition of default argument" in imgproc_c.h's
CVAPI(void) cvLine( CvArr* img, CvPoint pt1, CvPoint pt2,
CvScalar color, int thickness CV_DEFAULT(1),
int line_type CV_DEFAULT(8), int shift CV_DEFAULT(0) );

I'm a bit new to iOS programming so I couldn't find the solution. Maybe I'm using wrong version of opencv? Which have you used? Or, maybe, you know which caused such errors.
Would appreciate any help. Thanks.

BTW. For some reason "git clone --recursive git@github.com:noradaiko/caffe-ios-sample.git" - haven't worked. So i had to separately clone your repo, aleph7's caffe and xcconfigs and revert them to needed versions

@craftzdog
Copy link
Owner

You should use opencv v2.x.
You can download it(v2.4.11) from http://opencv.org/downloads.html, and try it again.

Please paste the error message when failing to build the project cloned with --recursive option.

@SPike666
Copy link
Author

git clone --recursive git@github.com:noradaiko/caffe-ios-sample.git
Cloning into 'caffe-ios-sample'...
The authenticity of host 'github.com (192.30.252.131)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? y
Please type 'yes' or 'no': yes
Warning: Permanently added 'github.com,192.30.252.131' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

@SPike666
Copy link
Author

I'm trying to build you app with already pre-trained caffe's network, which already worked on Linux.
But I haven't trained it and it was trained without using *.binaryproto, so I wonder if it work without it if i'll remove all references to mean_file and edit Classifier constructor.
I have no training set, so can't train my network properly with mean file.

Also not sure what should be in labels.txt file (have only *.prototxt and *.caffemodel)
Is there a possibility to add to your project some basic network files to check how it works. That would be great. Thanks.

@craftzdog
Copy link
Owner

You should have your SSH key registered on GitHub to clone it.

The classifier needs the binaryproto of mean file. Not sure if it works without the mean file.
The label file is just a list of category to show the prediction result, which is a text file each line is a name of the category.
Please learn more caffe and understand what these file are so that you can make your own app using caffe.

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