Filter / image texture Iphone - iphone

Good!
I need to add the image of the iPhone's camera filter / texture through a UIImagePickerController, but do not know how to directly access the camera image, since only with access to the eye.
The filter may be black / white, sepia or anything else.
Thank you very much! regards

Finally fixed the problem by adding a mask to the image, so it was not necessary to apply a filter lol.
thanks

Look here Apple Reference on Image Picker to see what you would need to select an image taken from the camera.
You can then apply the filters you need to this image any way you want.
Apple provides a nice sample project to do this: PhotoPicker You may want to try this out too.
If you need to have an effect that's added on the preview layer in real-time, you'll need to go into a bit lower api's methods, like the AVCaptureSessions and OpenGLES2.0 shaders. There is a good introduction into real-time shader's for the iPhone 4 at: Introduction to Augmented Reality on the iPhone by Nick Waynik. This should help you in figuring out how to add real-time augmentation to the preview layer.
Hope that helps!

Related

Roads are looking blurry in Unity

I am trying to make some real looking roads in my game,but the problem is ,when i am using roads so they are little bit blurry at distance and look like a real one.Can any one please guide me to solve this.I have uploaded my pic here
Is there possible solution for this?
Yes, it is a common problem, for textures' rendering at a certain distance/angle. You should enhance the aniso level, in order to apply an anisotropic filtering on the blurry texture (you can also change the aniso level from the texture's component, as in the picture below).
If the road is created via a Terrain component (which I doubt, since you already have a sandy terrain at the bottom), you should change the basemap distance.
Check also Quality settings, it might have Anisotropic textures disabled.

3D transform image (in Bohemian Sketch)

For my website, I want to use the vector image as shown here: http://www.sketchappsources.com/free-source/226-iphone-5.html
It's an iPhone 5 that is tilted.
Now I need to add my image to the screen which means I need to 3D-tilt it. I've tried and searched a lot but couldn't figure out how to transform my image so that it fits the iPhone 5 screen.
Any help in guiding me how to 3D transform my image would be greatly appreciated!
Cheers,
Frank
I recently released a plugin solving the exact issue, it allows you to draw a shape with the Vector tool and then apply the content of an artboard into the area. It's called Magic Mirror, please take a look at http://magicmirror.design

Apply a filter algorithm for each frame of the camera

I am working on an Iphone application.
I need to do the following: when the user clicks on the "Camera Tab" the camera open inside the view with circle overlays.
I want to apply a filtering algorithm on the camera.
I am looking for the best way to do this. Is there a library that can help?
What I am doing currently:
I am using the OpenCV Library.
I define a timer.
For each timer tick I call cvCaptureFromCam() method from the OpenCV
framework (This will capture the picture with a camera and return
it).
I apply the algorithm on the image captured.
i display the image in a UIImageView
The idea is that on each timer tick I get the image, filter it and put it in the UIImageView. If the timer tick is fast enough it will appear as continuous.
However the cvCaptureFromCam is a little slow and this whole process is taking too much memory.
Any suggestions of a better way is greatly appreciated. Thanks
Anything that's based on CPU-bound processing, such as OpenCV, is probably going to be too slow for live video filtering on current iOS devices. As I state in this answer, I highly recommend looking to OpenGL ES for this.
As mentioned by CSmith, I've written an open source framework called GPUImage for doing this style of GPU-based filtering without having to worry about the underlying OpenGL ES involved. Most of the filters in this framework can be applied to live video at 640x480 at well over the 30 FPS framerate of the iOS camera. I've been gradually adding filters with the goal of replacing all of those present in Core Image, as well as most of the image processing functions of OpenCV. If there's something I'm missing from OpenCV that you need, let me know on the issues page for the project.
Build and run the FilterShowcase example application to see a full listing of the available filters and how they perform on live video sources, and look at the SimplePhotoFilter example to see how you can apply those filters to preview video and photos taken by the camera.

Are there tutorials or simplified examples for how to use OpenGL texture blur?

I have a UIKit app (no OpenGL included yet) and I need to blur an image in there. Some people suggested to go with OpenGL texture blur for this. There's an sample project from Apple called "GLImageProcessing" but it's such a huge source base and filled with just too much of different stuff.
Maybe someone knows another source that showcases the texture blur on it's own, making it simple to follow the process how to set up an EAGLView that just does that one thing?
You probably want to apply a Gaussian blur effect. Here's a library somebody has provided to do this on a UIImage:
http://code.google.com/p/simple-iphone-image-processing/

UIImage animation

Maybe is there a way to do animation only on one image?
So if I have an UIImage and I want to animate it like a wave. Is this possible? And if yes, can you give me some examples or a link to start or something like this? (I used google but didn't find any good start link...)
OpenGL ES is another possibility. Apple provide all the code to set up a rendering context.
From there you just need to get your image into a texture, define some vertices (more than just four), and move each vertex on a sine wave.
Yes - you may want to look into cocos2d - http://www.cocos2d-iphone.org
or OpenGL ES as mentioned above
or Quartz
It all depends on what this 'Wave' effect needs to look like, if it's what i think, you couldn't achieve that by using Core Animation, you would need to look in to these suggestions.