0

Trying to attach map from tutorial "https://developers.google.com/maps/tutorials/fundamentals/adding-a-google-map#the_basic_html_page", into simple page, but getting error "Object # has no method 'setValues" in browser console. My code is exact the same as in tutorial, only id is different.

    <script src="http://maps.googleapis.com/maps/api/js?sensor=false" type="text/javascript"></script>
    <script>
        function Initialize() {
            var mapCanvas = document.getElementById('map-canvas');
            var mapOptions = {
                center: new google.maps.LatLng(49.8103, 23.8584),
                zoom: 8,
                mapTypeId: google.maps.MapTypeId.ROADMAP
            };
            var map = google.maps.Map(mapCanvas, mapOptions);
        }
        google.maps.event.addDomListener(window, 'load', Initialize);
    </script>
<div id="map-canvas"></div>

Can somebody help me to figure out, why this isn't working for me? Thanks in advance.


Your question is one of the classic ones in computer vision and image processing. Many doctoral theses have been written and scores of papers in conferences and journals.

In short direct pixel comparisons will not work in this case. A transformation of some kind is needed to take you to a different feature space. You could do something simple or complex depending on the requirements you have in mind. You could compute edges or corners. One suggestion already mentioned is the FAST corner detection. This would be a good choice as would SIFT etc... There are many others you could use but it will depend on how much the two images can vary and in what ways.

For example, if there is only going to be global color changes, tint, etc the approach would be different than if the images could be rotated or the object position changing in size (i.e. camera zoom).

Strictly speaking for the case you mention features such as FAST, SIFT, or even edges would work reasonably well. Check http://en.wikipedia.org/wiki/Feature_detection_%28computer_vision%29 for more information

4

2 に答える 2

12

忘れましたnew:

var map = new google.maps.Map(mapCanvas, mapOptions);
于 2013-10-09T14:41:01.300 に答える