Showing posts with label Maps. Show all posts
Showing posts with label Maps. Show all posts

Monday, November 09, 2020

Getting the distance from a QR code with known dimension

 In working towards an app that guide VI to navigate indoors (Blind Navigation System Using QR Code), I am working out the distance of a QR code from the navigator. This will allow the app to works like iBeacon that could tell the distance of navigator from the device.

OpenCV already have methods that could measure object dimension from a known reference. The first step is to convert the known dimension to pixel ratio. This will allow for different camera with different megapixel count. The formula is simple. ratio=pixle/real size of object.

With this constant, I will need to determine the distance from the navigator to the QR code. First I find the QR code then measure the QR Code size. The QR code most likely have to be enclosed within a rectangle so as to allow the measurement of the rectangle. Convert this size (in pixles) by the formula size=pixle*ratio. Viola, we get the distance from the QR code.

Measuring the position of the QR code is an essential metric. This will allow navigator to know the direction towards the QR code. This is easily done by getting the center point of the camera view then get the relative position of the QR code to the center point. We can inform the user whether it is to the right or left. Calculating the distance from the center point is quite meaningless as it is not useful to the navigator.

Unless navigator has a perfect memory of the position of all the QR code, there is a need for a map of the location with precise point of all the QR codes. The app should also allow the plotting of routes from one QR code to another so as to provide a voice guided navigation for the VI.

Deviating from the QR code will be an issue. Unlike iBeacon, once the QR code is not in the camera view, VI is practically lost. A facility to turn VI back to the track has to be made by approximating the last known point.




Monday, December 10, 2018

Picasa Substitute

I used to take photos and add captions and tags to the photos using Google Picasa. Unfortunately it is no longer supported. I have a hard time finding substitute for it. Recently tried a new windows app called digiKam. It is quite suitable for use. The following are some similarities and dissimilarities.

1. Edit Geolocation.

Both can edit geolocation. Both are able to update multiple files at one time. digiKam have additional functionality to do GPS correlator (loading a GPX file and interpolate the geolocation into the picture). Currently uses GeoSetter to do it.

2. Edit Caption/IPTC/XMP

Used the menu item of digiKam to edit IPTC. Although it can edit individual but it is a hassle if multiple files of the same group need to be edited.  Later, it was discovered that the right hand column has "Captions" can do multiple file update. Picasa has an advantage in that you could type in the keywords and it will auto suggest. digiKam provide a list of tags for you to select. Each has its own merits.

3. Search for tags.

DigiKam provide a tag listing where you can instantly apply a filter by choosing the tags. Picasa does it by typing into a search field. The latter can just type partially and the list will automatically match the partial words. I would say the latter is more flexible.

4. Grouping.

Picasa has a "starred" feature that allows a selection of pictures to be listed by choosing a set. digiKam does not have it but since I have been using tags to provide a list like "special", "flowers" etc. It is a matter of adding the "starred" tag and use it for listing under tags. However, it is slightly inconvenient as I have to fish the tag out from thousands of tags. Maybe I should use the star setting provided by digiKam instead.

5. External change of the tags.

DigiKam seems to be unable to respond to newly changed tags outside of its app (unless it is restarted). Picasa does not have this problem.

6. Maps

Picasa has maps but since the support is no longer available, it has not been working. Any individual change to the geolocation has to use GeoSetter. GeoSetter is kind of slow as it does a lot of background work. digiKam can show the icon/bubble on OpenStreetMap and can add the geolocation by dragging the file into the map.

7. Album listing.

Picasa can scroll through the albums. digiKam can only show within the same album. It is a disadvantage as I sometimes have to scroll through a list of albums to identify the observations.

8. Maps grouping - In the catalog setting there is another maps facility. This one allows to select by geolocation. A map is displayed on all pictures that have geolocation. You can select an area and it will display all pictures in the location. Very convenient tool to identify species in the same region.

In conclusion, no two app works exactly the same. Some will have advantages and disadvantages over others. digiKam is one app that is quite close to what I need to manage plants and animals photos with location info and tags by Gendre and Family for easy reference and research.




Sunday, February 26, 2017

Drawing buildings/Roads on OpenStreetMap

I used to update OpenStreeMap. One of the most headache thing is that my drawing skill is horrible. Thus far, I can only draw simple roads and square buildings. While trying to add a complex building, it strikes my mind that if I could have a overlay on the map and can trace over it just like what we do on paper.

In actual fact, a lot of people also does that. What they wanted to do is actually to put a logo on the window yet allow user to interact on the windows below it. Helow is an application that I used. The name is Custom Desktop Logo 2.0.

It is a simple app you can set the position of the photo to a standard point on the screen or you can specifically place the photo at exactly the right spot. There is a facility to set transparency. The photo must be in a directory alone. If more than one, the app will try to rotate the display of all the photos at a specific interval. Obviously there is a feature to size the photo to a limited dimension (within a range depending on the size of your photo). You can hide the logo if you want. Since it is on top all windows, it can be used on any windows applications.

With the available feature, I can then place the photo (like route maps from NParks). Set the transparency to just distinguishable. Set OpenStreetMap to the appropriate size, adjust the size of the photo to exactly the same size of the map with existing elements (using a slider). The only other thing to do is to trace the lines.

It is impossible to dynamically resize the photo to get more details in sync with the map but it sure helps in the drawing of map features.

I drew the Chestnut Nature Park North using this feature on Google Maps. It wasn't exact copy but at least it resembles the actual drawing and the positioning of the routes are quite close to real.



Sunday, November 25, 2012

Adding markers that shows picture in Google Maps

Previously I posted a blog about putting pictures in Google Map. It requires the pictures to be geotagged. What if you have a picture in Picasa but does not have geotagging? Here is how to go about adding bookmarks into Google Maps that shows a picture.

Assuming you are using Chrome for this purpose. Open Picasa and navigate to the picture you want to add to Google Maps (Gmaps henceforth).  Right click on the picture itself and choose "copy image url" ("Copy Image Location" in Firefox"). On Gmap, create a marker. Add a title. On the "Description" choose "Rich Text". You will be presented with a list of icons just above the text box. Choose "insert image" (icon that looks like a picture). On the URL input box, just "paste" (CTRL_V). Click "OK" and you get your picture as a marker.

The default markers have a "Camera" icon. Use that instead. Just click on the icon after you placed a marker. It is on the top left corner. Scroll down and you can choose the "camera" icon.

If you are more venturous, You could add your picture as icon. While choosing the icon, you can click on "Add an icon". On the URL prompt just "paste" again. I would not advice to do this as pictures are not icons. Moreover, you don't really see much of the picture when it is squeezed into an icon size.



Saturday, November 10, 2012

Maps.google.com distance in Metric

It is very irritating to see imperial distance measure system every time you check the distance in Google Maps. There seems to be no way to set locale.

Actually there is. Just switch to Google Maps in a country that uses Metric system. For example I use maps.google.com.sg instead of maps.google.com.




Thursday, November 08, 2012

Displaying routes and Markers in Google Earth

I used Google Maps to define routes and Markers. Only problem with it is that the Markers and routes are related. Upon creating hundreds of Markers and routes, Google Map start to truncate the list and make it into two page. This caused discontinuation of my Markers in relation to the routes. There is no way to show all the data at once.

One way out is to use Google Earth (not the browser version) to display. However, I noticed that there is a bug. Some of the routes have remarks. If you move the mouse over it, it will change to an arrow and you can click to view the comments. The bug caused some of the routes to stop showing the remarks.

The solution is to convert the KML to KMZ. I go to gpsvisualizer.com to do the conversion. Upon opening it in Google Earth. Everything worked just fine.

One guy suggested to do it in Google map itself. Just copy the KML address in the Google Map page. Open a new google map then paste the link into the search. Perform the search then copy the link address by clicking the link icon. Paste this in a new tab then book mark the page. It sure feel stupid just to view my own creation in this way but it worked. The whole list will appear in one page.

It is mighty weird that by posting the link in Facebook, the link will fail unless you convert it into a short URL. The conversion facility is in the link window itself. Just check it and you get the short URL.

Since I am an advocate for one touch easy access, it is deemed very low efficiency for me to create the link through the various steps every time I want to share a map., Thus, I created a custom map to do that. gmaps.js programmer provided this excellent library to create custom maps with various features.

What I did is simply remove the unnecessary elements from the html and modified the style to show the map full page plus replacing the sample KML link with the KML link of my map. I don't even have to post it on line to test the html. It is much slower to display the map. But it sure kills the boredom of generating the link to the map. I could even put all my maps in a selection list and share all the maps in one single map selecting page.



Friday, September 21, 2012

Plotting a route using MapOmeter




It has similar feature as Google Maps except it can view OSM maps too. Its "follow road" feature, while plotting the point, is excellent although it sometimes have the same problem as Google Maps like certain part of the screen turn blue as you plot along the way.




What I like the most is its ability to export the route to GPX whereas Google Maps only export to KML. This is surely a plus as I use OsmAnd (for navigation) which only imports GPX. Also the exported route follows the road exactly as plotted using "follow road" method. This means I could plot quickly and accurately the entire route (on road only).






Monday, September 17, 2012

ViewRanger

I am speaking on the point view of a sports tracking user not for this particular app. It just happened to have almost all the features that is required for a proper sports tracking. Therefore, I take this app as the reference.

Tracking sports activity is basic for all sports tracker. It keeps a log of your activity. How well and how accurate the tracking actually depends on the GPS that you have. At times it is accurate while it really foul up at other times. It once reported that I traveled at 600Kph on my bicycle. However basic it is, VR(ViewRanger) has it. Only problem is that the button appears on the map itself. It is easy to touch it by accident. It has no pause but it will prompt you to continue, start new or cancel. It does have auto pause and has a few threshold settings.

Maps is useful if you need to know where you are along the way. Those who have unlimited mobile data plan have no problem showing the maps during tracking. However, if the place is really out of range then you will simply get a blank background. Thus, it is vital that up-to-date offline maps are available. VR have both online, cache and offline maps.

Cached maps are dangerous as it will be automatically erased. Offline map is the preferred choice. This especially critical if you have a number of tracks at different part of the world. You could always go online to download but people without mobile data plans have to pre-load the map before commencing their journey. Therefore, offline map is the best choice. VR even have update feature for the downloaded maps. This means you need not define the map area every time you need an updated map.

Routes are vital if you need to travel through unknown areas or the route has too many twists and turns. Sometimes you need to move through a number of waypoints in a particular order. Routes will allow you to do that. Showing the route on maps is available on some sports trackers.

"Follow route" is one feature that is very useful. It is like navigation. You just follow along the pre-planned route and it worked like a charm. A good navigation app will automatically points to the next waypoint as you go along the route. Some even show you the new plotted route to the nearest waypoint if you went out of the way. VR does not replot the route to the nearest waypoint. It only plot a straight line from your current location to the nearest waypoint. That is one point I am not so happy about. However, if you are off road, no sports tracker will be able to give you any guide any way.

Direction idiots like me have problem reading the map. I am always confused as to which direction I am heading or moving. Good navigation program will provide you a heading direction indicator. It will show the rough direction where your device is pointing at. This will allow you to align your route to your heading direction. This is a feature that is very useful. VR does not have heading direction indicator. It does have a movement direction indicator. When you move, it will show the direction of your movement. Although this is not the best choice, it does help to align user back to the route. You will simply do trial and error by moving and realign yourself.

Voice navigation is a plus for map navigation especially if you don't have time to look at the device. So far none of the sports-tracker have voice synthesized navigation. VR does not have it too. Normally, I would use OsmAnd for voice navigation. It has offline maps too but is not for sports tracking use.

Social media linkage is one optional features which many user likes. VR does allow you to update your activity to Facebook and Twitter.

View routes/tracks published by other is also one feature that may prove useful. Instead of plotting my own route, you could use other's route for my own activity. Viewing the tracks done by others also allow us to gauge ourselves as to how fit we were compared to others (possibly of same age). VR does not show tracks done by others. It does show published routes by others. I personally find that routes are better than tracks as individual have repeated tracks that may not be useful as a route. Like other trackers, VR did allow users to convert tracks to routes.

VR does not automatically centers the map to the GPS location. If you turn off the screen and back on later, the GPS location may go off the map. Just tap the "lock GPS" button will solve the problem.

Also, the screen time out feature of Android will keep turning off your screen. VR does not have "keep awake" feature yet. To solve this problem, you just have to install a "keep awake" app so that could easily turn off/on "keep awake".

Don't even think of importing tracks into VR. Many sports tracker allow you to import tracks. This is one thing which I don't like about VR. I have only one activity, why do I need two devices to record it? You can only import routes in GPX format.

VR site allows you to import GPX as routes. Some route creating web output is not compatible with it. GeoPlanner, MapOmeter generated routes are not possible to import. VR have its own route creating facility but it has only straight line. No "follow road" plotting possible.

One last reminder. Please be aware that VR does a lot of calculations plotting your track on map and navigation (if you turn "follow route" on). Your battery will drain extra fast.


How to use ViewRanger on Android to follow a track offline

The first thing you need to do is to ensure that your GPS is set to on. Download the app from Google Play. It will then prompt you to register yourself on my.viewranger.com.

Zoom out by touching the "-" button so that it showed at least the local area of your interest. Wait patiently as it start to locate itself and download the map into cache. Do this at home where you have your home wifi turned on and your phone connected to it otherwise ensure that you have unlimited data plan as the cache is preset to 100MB.

Touch the map area. A top bar and a bottom bar will appear. Touch the right most bottom bar icon that looked like a list. Select "Create Saved map". Select "street" regardless of whether it is selected already. You can now touch the map and select the areas. Press the "+" or "-" icon to zoom in and out. When you are sure all the area you needed is selected, click "download". It may take a long time to download depending on the area you selected. If I am not wrong, there is a maximum limit to the size of the area. Wait till download is completed.

Touch the screen and choose "list" button again. This time choose "offline". Touch the screen again and cliick on the "map" icon and select "organizer". Choose "Maps", "online maps", "openstreetmap" (unless you choose another map while creating your map), "my saved maps". Select the map that you saved and click "view". You are now on offline mode.

Next go to my.viewranger.com and create your track or download a track (you may need to pay to download a track). After creating and saving the track, go hack to your Android and click on "menu","options","settings","synchronize", Go back to "organizer", "Routes" and  click on the "down arrow" icon. Click "follow route" and you can start follow the route.

If your position is not at the route, there will be a black line from your location to the nearest waypoint. Just follow the direction. You may need to move around a bit to see where you are heading as it does not show your heading direction unlike other navigation program. However it does have movement direction indicator. Heading direction shows you the direction you (your handphone) are facing whereas movement direction show the direction you are moving. The former is better as you don't have to move to know where you are heading to.

If you have unlimited data plan and your route is always within the range, don't bother to use the offline method. This note is for people who don't have mobile data plan or the route is out of mobile data range.

IF you want to track your performance then there is a "rec" button at the bottom right side of the map. Click on it and you can track your performance. Make sure you don't touch the button again while navigating.




Wednesday, September 12, 2012

Update latest OSM in OSMAnd

OSM data can be outdated in OSMAnd. Rather than wait for OSMAnd to post its update. You could download the data yourself to get the latest copy of the area concerned.

The first thing you need is OsmAndMapCreator from OsmAnd itself. Next, you need to download the daily update from geofabrik.de/osm. Singapore map is included in "Malaysia-Singapore-Brunei" map. Download and unzip the osm file and use the MapCreator to convert to obf file. Upload the obf file into Android \osmand directory. 

OsmAnd will automatically choose the map if your location is within the map area.



Friday, April 29, 2011

Creating Routes in Goggle Maps

I used to create Maps in Google Maps. Recently it has heen a point of irritation to me. Regardless of whether I create the route by "line" or "along roads". There seems to be some pointer problem. The waypoint may not always appear at the point you clicked.

Creating the route by "along roads" method is worst. The pointer will simply jump about. The trace lines may disappear for no reason. Worst of all, the resultant route may have all the waypoints but the distance indicated is not the full length. The "show the driving direction" feature was also cut short in this way.

I tried to plot the route by line then turn on "along roads". The result is the same. The route is cut short despite showing all the waypoints.

One other thing is that the "line" mode end of line clicking is hell. I don't seem to be able to click the same point to end the edit mode.

No matter what I tried I could not correct the problem. It has been like that for almost a year already and there seems to be no remedy.

IEndomondo has route creation feature also. The editing of the route is a bit crude and I cannot add additional waypoints along the route after it has been created.

Look like I am stuck with Google Map and had to live with the problem or quite creating routes all together.