Ask Your Question
3

IOS Open CV Image distortion

asked 2012-10-04 04:16:11 -0600

CoreMob gravatar image

Hello,

Very fortunate to know about Open CV. Has lot more advantages 1, IOS support 2. BSD license 3. Q A Forum etc.. Everything is fine. Hoping your support for the below.

Im building an iPhone app just simply like Fat booth and to achieve the distortion effect on facial parts, I built the opencv framework for ios and is working fine.

Basically I know Objective C language since native language of iPhone/mac os platform. Spent around couple of week to write code for distortion, I believe Warp Perspective or Perspective geometric transformation will have to work on this, Still there is not concrete solution or no pin point I made here. Now feel like no way around to get away this since i'm not mathematical grad and these functions/classes under open cv are all seems mathematical computation.

Please any one can point me direction to go forward. Thanks!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
3

answered 2012-10-04 05:06:30 -0600

Rui Marques gravatar image

updated 2012-10-11 07:55:17 -0600

Opencv has no out-of-the box image effects like you want but has functions to help you create your own. Another function that you will find helpful is remap().

Maybe you find these links interesting:

http://stackoverflow.com/q/1927145/1085483

http://en.wikipedia.org/wiki/Distortion_%28optics%29

EDIT:

More on remap():

http://docs.opencv.org/doc/tutorials/imgproc/imgtrans/remap/remap.html#remap

Also take a look at this question:

http://answers.opencv.org/question/1860/effect-name-and-how-it-can-be-done/

And this one (more info about remap, etc):

http://answers.opencv.org/question/565/non-rigid-stitching-functions/

edit flag offensive delete link more

Comments

Thanks! How would the cvwarpPerspective effect do? Creating image effects by own is difficult? Any direction to write code for creating own effects?

CoreMob gravatar imageCoreMob ( 2012-10-04 05:43:34 -0600 )edit

warpPerspective changes images like if the picture was taken from a different angle (different perspective). I updated my answer with more information.

Rui Marques gravatar imageRui Marques ( 2012-10-05 06:30:51 -0600 )edit

Great looking! Thanks for trying to improve, only hurdle for me is understanding the mathematical equation and working with matrix value, I applied distortion optics algorithm but not make sense of how the algorithm is working, by changing the value it deforms the image differently. Also im unsure the terms remap, map or transformation matrix. However you are greatly welcomed, your answer & comments are hoping me to climb up. Thanks!

CoreMob gravatar imageCoreMob ( 2012-10-05 07:20:24 -0600 )edit

Question Tools

Stats

Asked: 2012-10-04 04:16:11 -0600

Seen: 2,753 times

Last updated: Oct 11 '12