ARToolkit Cameraview is taking long time approx 10 mints to to detect the marker in case internet is limited connection.

Community support forum for the ARToolKit v5.x for Android SDK.
vikas.singhai
Posts: 20
Joined: Wed Dec 09, 2015 9:34 pm

ARToolkit Cameraview is taking long time approx 10 mints to to detect the marker in case internet is limited connection.

Postby vikas.singhai » Mon Mar 21, 2016 10:30 pm

Hi,

ARToolkit is taking long time approx 10 mints to detect the marker in case internet is limited connection, As per my requirement we need limited internet connection to access local host in side the application. I search on internet and found that if you will not give internet permission to your application then it will be fast. But in my case I want to access local host so I need to provide internet permission to my app.

If you will not give internet permission, Then it will not make any network call but in my case I am having internet permission so it is taking long time(10 mints) to detect marker.

How can I disable calling Camera Calibration service.

Regards,
Vikas

User avatar
philip_lamb
Site Admin
Posts: 660
Joined: Thu Mar 09, 2006 8:35 pm

Re: ARToolkit Cameraview is taking long time approx 10 mints to to detect the marker in case internet is limited connect

Postby philip_lamb » Wed Mar 30, 2016 5:38 pm

If you have no internet connection, then the attempt to fetch camera parameters from the server will fail immediately. In fact, the first check is whether the internet connection is up, and secondly whether google.com can be reached, and if both those pass, it will attempt to query the server.

rodrigo.silva
Posts: 2
Joined: Thu Mar 31, 2016 11:42 am

Re: ARToolkit Cameraview is taking long time approx 10 mints to to detect the marker in case internet is limited connect

Postby rodrigo.silva » Thu Mar 31, 2016 12:57 pm

Hey Philip,

I'm encountering a similar situation described by Vikas as my app have the permission to access internet but I'm only going to access things locally inside my company. Specificaly in my case, the 'timeout' is taking something close to 1-2 minutes.

Can't we bypass this service? Is there a workaround for this?

Thanks in advance.

User avatar
philip_lamb
Site Admin
Posts: 660
Joined: Thu Mar 09, 2006 8:35 pm

Re: ARToolkit Cameraview is taking long time approx 10 mints to to detect the marker in case internet is limited connect

Postby philip_lamb » Thu Mar 31, 2016 4:29 pm

We don't have a switch to avoid network communication at present, but it'd be pretty easy to implement. Note that without calibration data from the server, you're going to have to use other means to ensure that the calibration fallback file is appropriate for your device.

vikas.singhai
Posts: 20
Joined: Wed Dec 09, 2015 9:34 pm

Re: ARToolkit Cameraview is taking long time approx 10 mints to to detect the marker in case internet is limited connect

Postby vikas.singhai » Thu Mar 31, 2016 9:31 pm

Hi Philip,

Thanks for the answers and help.

Can you please guide me, how I can create camera_para.dat file only for my android device and can I implement switch to avoid network communication in android ARBaseLib Library.


Thanks & Regards,
Vikas

rodrigo.silva
Posts: 2
Joined: Thu Mar 31, 2016 11:42 am

Re: ARToolkit Cameraview is taking long time approx 10 mints to to detect the marker in case internet is limited connect

Postby rodrigo.silva » Fri Apr 01, 2016 3:54 am

Hi Vikas,

You may find some information about the camera calibration in the following links:

http://artoolkit.org/documentation/doku ... on_service
http://artoolkit.org/documentation/doku ... alibration


Regarding the 'network switch', I've only found the approach (which I do not like, to be honest) of enabling and disabling the WiFi by using the following code in the onCreate / onPause / onDestroy of the activities.

Code: Select all

WifiManager wifiManager = (WifiManager)this.context.getSystemService(Context.WIFI_SERVICE);
wifiManager.setWifiEnabled(true); // or false..


Is there a better approach for this?

Best regards,
Rodrigo

vikas.singhai
Posts: 20
Joined: Wed Dec 09, 2015 9:34 pm

Re: ARToolkit Cameraview is taking long time approx 10 mints to to detect the marker in case internet is limited connect

Postby vikas.singhai » Sun Apr 03, 2016 3:12 am

Hi Rodrigo,

Thanks for the reply!!!

In my case I can not disable internet connection because I am fetching the information related the visible marker from the local host and to access and get the info from local host we need internet gateway.

That way I asked Philip, is there any exiting API through which I can disable the network calls or can I implements that API in ARBaseLib android.

Regarding camera calibration, I checked with those links but but I couldn't find any way, how I can create camera_para.dat for my android device.

Regards,
Vikas Singhai

ankitagarwal5859
Posts: 6
Joined: Thu Apr 28, 2016 11:34 pm

Re: ARToolkit Cameraview is taking long time approx 10 mints to to detect the marker in case internet is limited connect

Postby ankitagarwal5859 » Fri Apr 29, 2016 4:52 am

You can modify cparamSearch.c file which is in lib/SRC/Video path,and avoid the network call

singhaiv
Posts: 2
Joined: Sun Nov 01, 2015 5:05 am

Re: ARToolkit Cameraview is taking long time approx 10 mints to to detect the marker in case internet is limited connect

Postby singhaiv » Wed Jul 20, 2016 11:58 pm

Dear Ankita,

Thanks a lot for the reply !!!

I can do the modification, but I don't how to rebuild the complete ARToolkit lib after doing modification in cparamSearch.c file.

I am using libARWrapper.so and libc++_shared.so, which lib I need to generate after doing the modification in cparamSearch.c file.

If you know the steps please let me know or if you have already modified ARToolkit lib, please share with me.

Thanks & Regards,
Vikas Singhai

mdrio
Posts: 7
Joined: Wed Apr 20, 2016 1:48 am

Re: ARToolkit Cameraview is taking long time approx 10 mints to to detect the marker in case internet is limited connect

Postby mdrio » Wed Jan 11, 2017 1:51 am

Hi, I have a similar problem. Did you rebuild successfully libARWrapper after modifying cparamSearch.c?

mrbungle
Posts: 10
Joined: Mon Dec 12, 2016 6:02 pm

Re: ARToolkit Cameraview is taking long time approx 10 mints to to detect the marker in case internet is limited connect

Postby mrbungle » Mon Jan 30, 2017 3:35 pm

Same problem here - we really do need a way to switch this camera parameter download feature off, or at least control the network timeout to something reasonable, like 3 seconds. It's a great idea given there are so many types of android phones, but the timeout is highly variable. Attempting to contact google.com is not really a good test of internet access, on one of the WIFI networks I use there is a proxy that allows google but blocks pretty much everything else. It better to just try to connect directly to the camera parameter service URL and control the timeout. I'm happy to help implement that - any guidance on best practices for how to do it?

MrDaniel
Posts: 381
Joined: Wed Nov 18, 2015 9:07 pm

Re: ARToolkit Cameraview is taking long time approx 10 mints to to detect the marker in case internet is limited connect

Postby MrDaniel » Sat May 27, 2017 2:40 am

Dear MrBungle,

This is something we can look into.

However, ARToolkit6 is coming soon in the next 2-3 weeks. So it might be a change that's better suited to that implementation, but by all means a v5 and v6 version would be great.

In order to implement this, we could make and share a branch to get it working.

Can i ask why this is required? Ideally, the server should provide the correct parameters for your device. If it isn't doing that, then perhaps the server needs a fix and not the interface to ARToolkit?

Thoughts?

Regards,

Daniel


Return to “ARToolKit for Android”

Who is online

Users browsing this forum: No registered users and 1 guest