Windows Phone - get location of Image - windows-phone-7

I have a camera app, and want to store the location of where the Image was taken.
I'm wondering what the best practice to implement this is?
I can think of two possible solutions;
1) Get the location directly from the Image. I'm not sure if this is how it works in Windows Phone, but perhaps the location is stored in the Image every time you take one. If so, it would be easy to get it directly from the image.
2) If not, implement a GeoCoordinateWatcher that starts when I open the camera view and stores the location after I've taken the photo and then stops.

The camera photos have no location tagged to it. You need to capture the image, then the attempt to get the gps location after the picture is taken and tag it to the image.

Related

Add markers to image similar to what the mapping apps do - Xamarin.Forms

I am currently using Xamarin.Forms and I would like to import an image and be able to add markers to it. Similar to what the mapping apps do, but want to be able to do it from an uploaded image or from taking a photo. I would also Like to be able to set a scale on it after the image was uploaded by placing two or more markers and then entering a measurement between those markers.
When displaying an image/photo I would like to place markers on them that would have more info about the pinned location on the image. These pins must be saved in a database so that the next time it's opened the markers will be in the correct location as they were placed the first time.
If anyone knows how I can get started on this, or know of any libraries that allow you to this, it would really be appreciated.
.
Update
Loading the image from file, camera or url is simple enough.
Zooming in and out after the image is loaded was simple enough too. Altering the scale size of the Image by making use of the PinchGesture.
Moving the image around ended up being simple too, and it was achieved by using the PanGesture and altering the TranslationX and TranslationY.
.
.......Still searching for a working and reliable solution for adding Pins/Markers at a location on the image and the markers need to have a click or tap event attached to it.

AR.JS: Desktop-based static target image

I don't need or want "live placement" using a camera. I will already have an image with a target in it, and a second image for which I know its real-world dimensions. I want to place this second image on top of the image with a target in it, but in the correct position/perspective, etc. Then save the result as a third combined image.
I can't find any information on how I would implement this with AR.js, or if it is even possible.

What are Default Picture Names from the Hardware Camera

I noticed that depending on how an image was taken or saved to the Windows Phone device, a different naming scheme may be used. For instance, a picture taken from the default camera application and saved to the Camera Roll will be WP_20131108_001.jpg, and a picture from screenshots would be wp_ss_20131108_0001.jpg, while the Saved Pictures album naming convention seems to be random based on where the picture came from. Is there a systematic naming scheme for pictures in different albums?
I need the ability to know when a picture was taken with my application or not in case it is used later (and it may be chosen from the PhotoChooserTask). I was thinking if there is no standard way to tell where a picture came from, then when saving an picture from my app I could put in a certain text value in the name and then check to see if a picture's name contains that text when being used in my app, and in that way flag to know whether a picture originally came from my application or not. Any suggestions?
You can use Album.Name functionality of Picture class to get the album name/source folder where the picture came from.And while saving in cameraroll or saved pictures you can provide a custom name for your picture.
fileName = "Camera_" + DateTime.Now;
MediaLibrary library = new MediaLibrary();
library.SavePictureToCameraRoll(fileName, stream);

Setting Image Sizes In Windows Phone

Windows phone asks for specific image sizes when submitting an application. When I take the image I wanna use and resize it to the dimensiond they want it distorts the image. If I keep it proportional Ill never get the exact sizes they need. What do you guys do to resolve this?
I used Photoshop. Open the image, choose "Image" > "Canvas Size". That will adjust the size of the image without distorting it. I am sure you can also use any of the free image applications like gimp http://www.gimp.org/

Find logo in desktop screenshot

I need to develop a desktop application which will
1.) have a list of the Different Application logos (Background Transparent) e.g. IE, FIREFOX, CHROME, PHOTOSHOP ETC.
2.) User will take a screenshot of desktop and save the image.
3.) Now my application need to search all the logos in the screenshot image and tell which all logos are present and where.
4.) I used OPENCV, it's working, but when user changes the desktop background & captures screenshot, it's not working as the transparent area of logo is getting the desktop background content.
Can somebody provide a solution or libraries open source, commercial to do this job.
This is easy to do using cross-correlation.
See my answer to this question.
Basically:
Start with desktop image and one template image for each icon
Apply edge detection (e.g. Sobel) to the desktop image and template images.
Throw away the original desktop image and templates, you won't need them anymore cause we'll be using the edge-detected images
For each template
Do template matching as you normally would
Threshold the maximum of the result. If it's above the threshold, you have a match at that position. Otherwise, no match.
If your icons are aligned in a grid on the desktop, you may be able to speed up your processing by only checking those specific grid positions.
EDIT
You can also save a lot of time by knowing which icons to search for. If you have access to the file system, then just look for *.lnk files (or any other extensions you may be interested in) in the directory that corresponds to the desktop (can't remember exactly what it is, but for Windows7 it's something like c:\users\misha\desktop). That will tell you what icons are there on the desktop. This will allow you to shorten your template candidate list before you go and do the template matching.
I like misha's answer and I think it should work for you. But it that doesn't work you could try replacing the transparant pixels in your reference logo with uniformly distributed random noise before trying the match. This will make the transparant pixels irrelevant for any matching computation because they will match just as bad no matter what there is on the desktop in those pixels.
I'm not familiar with the tools you're using, but I'm guessing you have to either:
a) Tell your program to ignore transparent pixels in the icon images during the comparison operation.
OR
b) Tell your program to treat transparent pixels in the icon images as "wildcards" which can be any color.

Resources