2D distortion of a face from an image on iOS? (similar to Fat Booth etc.) - objective-c

I was just wondering if someone knows about some good library or tutorial on how to achieve a 2D distortion of a face taken from an image taken by the user.
I would like to achieve a similar effect to the one in Fatify, Oldify, all those Fat Booths, etc., because I am creating an app where you will throw something at the face and I would the face to jiggle and move when the object hits it.
How should I do this?

I have found an almost identical question here with an accepted answer.
Also, speaking about distorsion algorithms there is an algorithm used by GIMP called "liquid rescale". You can find it here and is written in C/C++ so you could integrate it in your iOS App (license permitting, I haven't checked that).
Here is another similar question as well.
Hope that this helps to get you started on this.
EDIT: Some examples (will post some code soon)
EDIT 2: I was looking for some code and I found some blog posts that explain the filtering algorithms used to implement the liquid rescale algorithm. Is not easy and I don't think in short time and with no prior knowledge on the subject I could do more than sharing this link. The author of the GIMP implementation appears to be called "Shai Avidan" (see this post). I suggest you might try to contact him or anyone else in the field (see wikipedia references on the subject). Sorry if I can't help more.
EDIT 3: I found a book with some JAVA code on "Principles of Digital Image Processing: Fundamental Techniques".
Also, this is a link to a Digital Image Processing course by Prof. Bernd Girod at Standford University. There are slides and tutorials.
Then I found some more results by googling the term "Principles of Digital Image Processing spring".
Anyway.. this was just to add some extra to the answer as I was thinking about it before.

Related

Is there a way to use text-to-speech directly in bb10

I want to generate some text from my bb10 app to give audio feedback to the user.
(But the screenreader like in the accessibility feature is not sufficient)
Has anybody already successfully got text-to-speech implemented?
There are countless open source projects that do this on PC platforms. You may have your best luck in fitting them to your needs. – Josh C
Any library you would recommend? It should have C or C++ interface and must work offline (no server based solution) and it should not occupy too much memory. – thowa
I had to check to make sure it was written in C++ which it is. It is called ESpeak. I heard about it nearly 7 years ago when I was looking for a speech synthesizer that was powerful/robust enough to sound like a human. I believe it was ESpeak, and back then it was a complicated task to get it to spew out realistic sounding speech.
http://sourceforge.net/projects/espeak/files/
This one looks promising as well; however it is written in java.
http://mary.dfki.de/Download/openmary-open-source-emotional-text-to-speech-synthesis-system-released
Found here https://github.com/marytts/marytts

Where to get sample Code for titanium code?

I am just a beginner in Titanium and searching for few sample source code to learn from and run. Downloading and working with kitchen sink or with the API is a big pain, to understand as well as to work with.
Although everything is there in both and they have given sample but that seems like not an implementation. I just want to have some source code to learn how, when and where to use the elements? How things work, how are they integrated etc.
Usually at the Q&A section there are samples of code. Just search what you are looking for: http://developer.appcelerator.com/questions/newest
The Wiki provides examples: http://wiki.appcelerator.org/display/guides/Home
Even this website provides code samples, check out the Titanium Tag: https://stackoverflow.com/questions/tagged/titanium
And last, but not least, there seem to be more and more code samples in the API Docs: http://developer.appcelerator.com/apidoc/mobile/latest
Good luck!
As an option, you can find good application samples on CodeCanyon. They're not free but you can learn a lot by examining how to start from scratch to build an application like;
Simple Foursquare like apps
Photo gallery apps
TODO apps etc.
http://codecanyon.net/category/mobile/titanium
I found this Forging Titanium series on Vimeo.com to be one of the best. Just watch out this complete series. Beside providing you with basics and advanced limelight on elements and functionality, also provide link to many github public repository we can follow and get numerous sample codes.

How do I find working examples of Cocoa/Carbon API?

I find it hard to find some working examples of Cocoa/Carbon framework functions, whereas there are well documented function prototypes from Apple.
For example, LSOpenItemsWithRole function has well defined prototype, but I guess some examples would be a great help for a mac programming beginners like me.
How can I find some working examples for Cocoa/Carbon API? Doesn't Apple provide that? MSDN has good working examples, I expect similar thing from Apple.
You can find some sample code on Apple's developer site, and some of it can also be found within the Xcode documentation viewer. In fact in some cases, but probably not enough, you'll see links to sample code right at the bottom of the API documentation.

Objective-C implementation of Shape Context algorithm (Image Matching)?

There is a very cool sounding technique called Shape Context matching, which can be used in an Image Recognition application to match an "unknown image" against a known "image library." There are numerous descriptions of the concept documented on the web (mostly all variations of the same original paper), for example: http://www.eecs.berkeley.edu/Research/Projects/CS/vision/shape/sc_digits.html
I found a JAVA implementation and a MATLAB implementation of the algorithm described in the paper, but I cannot find an objective-c implementation. Anyone know if there is any objective-c code out there, anywhere, implementing these techniques? I sure would like to take advantage of it, rather than trying to write that stuff myself!
Here you can find an interesting c++ implementation (for non-commercial usage, didn't check it yet.. see the downloads):
http://www.umiacs.umd.edu/~zhengyf/PointMatching.htm
I'm currently searching for a Java implementation of the algorithm. Could you please provide a link to the implementation you found?
The original matlab code can be downloaded at:
www.eecs.berkeley.edu/Research/Projects/CS/vision/shape/sc_digits.html
I also found a C# implementation:
http://www.pscode.com/vb/scripts/ShowCode.asp?txtCodeId=7465&lngWId=10
Take a look at OpenCV. It is implemented in C so it can be used in obj-c pretty easily.

Where can I find information about programming the TI TMS320C64xx DMA controller

I need to do some simple memory transfer using this DSP, but I am unable to find any documentation about the DMA functions. I am using C with code composer 3.3
OK in a flash of inspiration I Googled for the one DMA specific function I found in the code, and found this and TMS320C645x DSP Enhanced DMA (EDMA3) Controller user Guide
It seems to me that Texas Instruments gives quite some documentation on these processors. For instance, the TMS320C6418 data sheet. A list of all TMS320C64xx controllers is listed here (click on the part number to go to the reference material).
I'm not well acquainted with the subject matter, just tried to locate the information for you. If this isn't providing the information you're after, please let me know.
EDIT: added links below for ease of reference for later visitors (they have been mentioned in the comments):
List of published documents for these and other related Texas Instruments IC's: Digital Signal Processors & ARM Microprocessors
General reference guide for TMS320C64xx processors: TMS320C64x+ DSP Megamodule Reference Guide
Somewhat related, as an example of programming: video processing with the TMS320C64xx processors.
See also the answer provided by the OP himself, which shows two additional helpful documents.