Re: Simulate touch event with cordinate?
Re: Simulate touch event with cordinate?
- Subject: Re: Simulate touch event with cordinate?
- From: Jesse Armand <email@hidden>
- Date: Sat, 02 Apr 2011 13:29:30 +0200
Then, you are explaining your problems incorrectly.
You're looking to handle the motion of the face, recognized by the
face recognition algorithm and captured by the camera. You can't find
that answer in the iOS SDK.
You need to implement your own algorithm to detect those movements and
convert it somehow to a group of points or rects in the screen, with
their paths of movement.
Once you obtained this path, then you can do something with it.
But, my word of advice:
People don't read PDFs with the gestures of their face or head. It's just silly.
Jesse Armand
----------------------------------------
(http://jessearmand.com)
On Sat, Apr 2, 2011 at 7:25 AM, Rikza Azriyan <email@hidden> wrote:
> Thanks chase for your reply,
> Yes, i want to make an application like ibooks that the user can navigate the page by swipe the screen, than
>> - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
> Will respond for that swipe...
> But in my case, i don't want to make that swipe with my finger...
> I want to make that swipe by my face....
> So that i want to implement my facetracking algorithm on my iphone 4...detecting the face by frontcamera, and give the output result as the face position cordinate.
> I'm going to use this cordinate as realtime dragging event on my PDF reader as if the finger swiping in my screen. As ibooks did use finger for swipe...
> that what i want to do chase...
>
> I hope u understand my bad english :)
> Thx in advance
>
> Rikza Azriyan
> Student of Sriwijaya University
> Palembang, Indonesia
>
> Sent from my iPhone
> Provided by Telkomsel.
>
> On Apr 2, 2011, at 9:36 AM, Chase Latta <email@hidden> wrote:
>
>> Are you trying to achieve something like, in the iBooks example, the
>> user can swipe their finger to change the page or press a 'next page'
>> button and have the same animation occur? If so then you need to
>> write one function to handle the animation and call that in response
>> to either a button push or a series of touch events.
>>
>> - (void)moveMyThingFrom:(CGPoint)a toPoint:(CGPoint)b;
>> {
>> // Put code here for the animation
>> }
>>
>> // For button press
>> - (IBAction)moveThingAcrossScreen:(id)sender;
>> {
>> CGPoint fromPoint = ...;
>> CGPoint toPoint = ...;
>> [self moveMyThingFrom:fromPoint toPoint:toPoint];
>> }
>>
>> // For drag events you could do something like
>> - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
>> {
>> lastPoint = ... // Value stored somewhere
>> CGPoint newPoint = ... // Calculated from event
>> [self moveMyThingFrom:lastPoint toPoint:toPoint];
>> }
>>
>> The main point is that you should not be performing your animations in
>> your event handling code; this should be in separate methods that get
>> called from your event handling code or wherever you need to call it.
>>
>> Is this what you were looking for?
>>
>> Chase
>>
>> On Fri, Apr 1, 2011 at 7:02 PM, Conrad Shultz
>> <email@hidden> wrote:
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> On 4/1/11 6:44 PM, Rikza Azriyan wrote:
>>>> Sorry maybe you guys don't understand with my bad english..
>>>> I said UIGestureRecognizer does'n do what i want because it's for detecting/responding touch,gesture,tap etc that user did to the screen. It's for respond the user interaction to the screen...
>>>> In my case, i want to make that interaction. I want to make a touch event without touching the screen, i want to make slide event without touching it....
>>>
>>> Could you explain WHY you want to do this? Surely if your app takes a
>>> certain action in response to a gesture it would be easier to just
>>> trigger that action on demand.
>>>
>>> Don't know what your goal is, but at first read this sounds like the
>>> product of a very flawed application architecture.
>>>
>>>
>>> - --
>>> Conrad Shultz
>>>
>>> Synthetiq Solutions
>>> www.synthetiqsolutions.com
>>> -----BEGIN PGP SIGNATURE-----
>>> Version: GnuPG v1.4.7 (Darwin)
>>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>>>
>>> iD8DBQFNloOfaOlrz5+0JdURAmhwAJ9tvB7kMYsTq9oSeCNo0+Fm91/vHgCdGP4b
>>> 5+O28EP12Ej/qBFMsO5omys=
>>> =evPd
>>> -----END PGP SIGNATURE-----
>>> _______________________________________________
>>>
>>> Cocoa-dev mailing list (email@hidden)
>>>
>>> Please do not post admin requests or moderator comments to the list.
>>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>>
>>> Help/Unsubscribe/Update your Subscription:
>>>
>>> This email sent to email@hidden
>>>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden