Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Contributor
samir22
Posts: 8
Registered: ‎02-05-2013
My Device: Dev Alpha

OpenCV sample project and troubles

[ Edited ]

Hey guys,

 

I know this has been asked before on this forum but I am starting a new thread again in the hopes that others might also find it useful.

 

Is there any OpenCV + QT sample project that exists? I am having extreme diffculty in getting OpenCV to work.

 

New Contributor
samir22
Posts: 8
Registered: ‎02-05-2013
My Device: Dev Alpha

Re: OpenCV sample project and troubles

I'm putting down my progress till now so someone may find it helpful.

 

I downloaded the source from the github page and built dynamic libs and when included in the app, it wouldn't launch on the device. I then built static libs.

 

I added them to the app and got this error:

ext/atomicity.h not found

So, I added the following

 

INCLUDEPATH += $$(QNX_TARGET)/usr/include/c++/4.6.3
INCLUDEPATH += $$(QNX_TARGET)/usr/include/c++/4.6.3/arm-unknown-nto-qnx8.0.0eabi

 
but that results in

home/user/bbndk/target_10_0_9_1673/qnx6/usr/include/c++/4.6.3/bits/stl_relops.:68: Parse error at "std"

 

After getting the atomicity.h error, I tried another way, by passing in -Y _gpp to the compiler but that results in 418 errors, including

 

/home/user/bbndk/target_10_0_9_1673/qnx6/usr/include/c++/4.6.3/bits/basic_string.h:312: error: undefined reference to `std::string::_M_leak_hard()'

 

Can anyone help figure out what is happening?

 

Thanks!

 



 

 

Contributor
mark12
Posts: 33
Registered: ‎01-02-2012
My Device: 9900

Re: OpenCV sample project and troubles

Hey,

I wanted to try the same thing, but what i found was that the github Opencv is only for playbook OS and there is none for BB10. Im gonna work on this and let you know if successfuly set it up. 

Thanks so much for posting the thread, there is no discussion about Open CV whatsoever on these fourms.

 

Contributor
mark12
Posts: 33
Registered: ‎01-02-2012
My Device: 9900

Re: OpenCV sample project and troubles

wait so r u using this in cascades or Native??

New Contributor
samir22
Posts: 8
Registered: ‎02-05-2013
My Device: Dev Alpha

Re: OpenCV sample project and troubles

[ Edited ]

mark12,

 

I was using this in a QT creator project. I'm going to try Cascades using Momentics now, will update result.

 

Edit: typo

Regular Contributor
_NishantShah
Posts: 76
Registered: ‎07-31-2012
My Device: Blackberry

Re: OpenCV sample project and troubles

Hi samir22,

 

I also have the same trouble with OpenCV. Post the solution if you find any.

 

Regards,

Nishant Shah

BlackBerry Development Advisor
smcveigh
Posts: 668
Registered: ‎11-29-2011
My Device: developer

Re: OpenCV sample project and troubles

I don't think there should be any differnce between building for PlayBook or BB10.

Now that BB Jam is over, I should have a bit more spare time to look into this.  Perhaps I will try building it over the weekend and let you know if I have any trouble.

 

Cheers,

Sean

New Contributor
samir22
Posts: 8
Registered: ‎02-05-2013
My Device: Dev Alpha

Re: OpenCV sample project and troubles

Hey Sean,

 

Sounds great. Would appreciate if you could share working code too.

 

Thanks!

Contributor
mark12
Posts: 33
Registered: ‎01-02-2012
My Device: 9900

Re: OpenCV sample project and troubles

I tried following the steps provided in the READme file on Github, these steps were solely for cross platform unix. Some questions that are tauntung me. and are not clear in the steps are...

1. When we make the Opencv through Cmake, which build option should we choose..(such as Eclipse 4DT Unix makefiles, Visvual Studio etc)?

2. Where do we make the "build" directory? Is it in the ndk directory or else where

I have tons of questions that I cant even reember...but be honest the steps provided in the readme file are quite vauge and only apply to unix platform. 

If possible Sean, you could post deatiled steps of how you went about setting up Opencv with Cascades/NATIVE.

It will be of a great help.

Thanks.

New Contributor
samir22
Posts: 8
Registered: ‎02-05-2013
My Device: Dev Alpha

Re: OpenCV sample project and troubles

mark12, if you follow the steps on any *nix box, it'll compile perfectly. The problem appears to be after that - using it in any app.