osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.68k stars 1.02k forks source link

Investigate why mapillary sometimes does not find nearby images #4806

Open utack opened 6 years ago

utack commented 6 years ago

Due to the nature of mapillary position and map inaccuracy, it would be nice if you could allow the search for "online images" when setting a temporary orange marker to have a larger radius.
I am missing a lot of mapillary photos of places I can find in the mapillary overlay, and other users will certainly also be missing some.
Thank you for consideration!

vshcherb commented 6 years ago

We are using radius = 50 meters (passing to Mapillary) in many places it already finds lots of unrelated images. In case to have full overview it is better to use Mapillary layer.

utack commented 6 years ago

Would it be possible to do 2step search, or would this add a lot of traffic/load on mapillary server overhead?
Search within 30m if nothing is found, search within 100m Actually in the example i tested 50m should be quite enough, no idea why it does not find the image

vshcherb commented 6 years ago

Yes but the puprose is to find image that could display a certain point & not the point in 200 meters which could be completely irrelevant

majkaz commented 6 years ago

Something is wrong either with the search or with the Mapillary response (or positioning of the pictures).

I have observed it on photos I have uploaded to Mapillary myself - I know exactly where these are (in reality, what GPS-info is sent to Mapillary and where Mapillary positions these), but sometimes, the position on the road doesn't return any photos. It shouldn't be possible with the mentioned radius - my latest photos are spaced 5 m (perhaps 10 if some are deleted from the sequence), and even counting the street width in (max. 2 lanes in one direction, also maybe additional offset of about 10 m?) and some accuracy differences - often, the search doesn't find any photos for a relatively big region (perhaps 200m of a street) where at least some should be found. Not sure why - if I find one photo from the sequence, I can move from one photo to next, and see the correct positions on the map at the position where I started the search from.

Could it have something to do with the slow Mapillary response #4776? Meaning perhaps the connection to Mapillary is timing out and it only looks like no photo was found?

utack commented 6 years ago

Yes I think i observed the phenomenon @majkaz is seing
Sometimes it seems like mapillary shows images with a certain distance first.
For example I tap in Spot A, my image is 5m away from Spot A, it does not show up in the list at all, only other images further away.
Then I tap in Spot B, that is about 50-80m away from Spot A, and the image that is really close to Spot A, I was originally looking for, is suddently first.
Could you maybe clarify if this is a problem on mapillary's end, or if there are some rounding errors in coordinates during communication with mapillary?
Thank you!

vshcherb commented 6 years ago

Our code is open-source so you can check it but I think it could be related to Mapillary - https://github.com/osmandapp/osmandapp.github.io/blob/master/website/api/cm_place.php

utack commented 6 years ago

Ok so search radius is not the problem it seems, but sometimes it does not find images despite being nearby ( <10m ) This depends on where you start the search. Example: This is where my image is: 01 png

This is where it finds it: 02 png

03 png

This is where it does not find it:

04 png

05 png

vshcherb commented 4 years ago

360 degrees are now fixed (pano photos) https://github.com/osmandapp/OsmAnd-tools/blob/master/java-tools/OsmAndServer/src/main/java/net/osmand/server/api/services/PlacesService.java#L239

 } else if (ca > 0d && angleDiff(bearing - ca, 30.0)) {
            main.add(cp);
        } else if (!(ca > 0d && !angleDiff(bearing - ca, 60.0))) {
            // exclude all with camera angle and angle more than 60 (keep w/o camera and angle < 60)
            rest.add(cp);

Though it tries to find photos that are aligned with 30/60 degrees with bearing