Closed DRybochkin closed 10 years ago
I made a Google search, and I spotted that this problem had also been observed here. It seems like WP8 deployment has a size limit on methods. I will give the Vision project a look to see if there are some simple refactorings that could be made. In the time being, do you have any more information from the deployment error?
And almost immediately, two strong candidates showed up :-) FaceHaarCascade and NoseHaarCascade.
I will investigate how easy it is to move the data of these classes/methods to the library resources to see if such an approach could solve this problem. For the time being, maybe you can exclude these files from the Accord.Vision project and re-build? (I have not tested this myself, so I do not know if the classes are referenced in any code right now.)
Unfortunately no. I'll try :-)
Yeah, those are definitely some strong candidates :-P But those files could also be safely removed from the portable project. The same functionality can be achieved by loading the xml files found in OpenCV using HaarCascade.FromXml. The XML definitions could surely be embedded as resources in the project file, or perhaps distributed along the binaries.
There are other files which may as well violate this maximum size constraint, such as the FAST feature point detector. The problem is that those files have been automatically generated by computer tools, and so they look extremely large, but are also very fast to execute.
Thanks, @cesarsouza, I was just about to make a similar comment, glad you could verify my assumptions :-) Just to add, the OpenCV XML files can be found here.
Yes, and some others (such as the one for the nose) can also be found here.
Great, thanks again Cesar.
@DRybochkin I will remove the FaceHaarCascade
and NoseHaarCascade
classes from the portable Vision project then, hopefully later today. I'll update the files in the prebuilt binaries accordingly. In the meantime, are you able to check whether removing these classes are enough for the Vision assembly to be successfulyy deployed on WP8?
Have now removed the predefined Haar cascades from the PCL Vision project. Tested usage and deployment in WP8 project, seemed to work well.
@DRybochkin When you have verified that you can include Accord.Vision in your project, please confirm by closing this issue.
Thanks in advance! Anders
Yes you are right. Thanks
Hello again. When I add to the project Accord.Vision error occurs deployment Optimization of the deployment failed with error "method (s) exceeds the maximum permitted size." you must separate methods
In what could be problem?
Thank you in advance for the reply.