How to calculate an image position on the screen

iPhone Discussions

How to calculate an image position on the screen

Postby A Person » Sat Jan 29, 2011 1:06 am

Now this question may sounds kinda stupid but i can't actually figure out how to do this, the only data i've got is the width and height of the image and pixel data as either a black pixel or a white pixel so 1 or 0. What i want to do is if i have a character such as # on the screen i want to calculate the translation from one # image to another so lets say there is two images of # one of them is here and the other here
# #
i just want to see the translation values for this, for example (x = ?, y = 0) i've thought maybe getting the distance of each pixel that is black to a center pixel on the screen in between the two images or something and then see how much that distance changes but im kind of lost right now. :?
there's no place like ~/
A Person
 
Posts: 161
Joined: Fri Sep 25, 2009 3:45 am
Location: Canada

Re: How to calculate an image position on the screen

Postby Sumaleth » Sat Nov 26, 2011 6:53 am

(edit: this was in response to a post that was deleted)

=Area_of_A/Area_of_B * 100
=(480*210)/(720*480) * 100
~=.29 * 100
~=29%

(this would have been better as a new thread?)

Rowan.
Last edited by Sumaleth on Wed Dec 07, 2011 12:17 am, edited 1 time in total.
Sumaleth
 
Posts: 197
Joined: Thu Sep 03, 2009 9:55 am

Re: How to calculate an image position on the screen

Postby WhatsOurVectorVictor » Tue Dec 06, 2011 8:32 pm

Are you talking about image recognition?
WhatsOurVectorVictor
 
Posts: 6
Joined: Thu Sep 29, 2011 4:10 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests