Photoshop Vibrance effect in OpenCV - android

I want to implement Photoshop Vibrance effect in OpenCV C++, can anyone tell me a mathematical formula for implementing the exact effect for a value of vibrance given by the user.

have a look at the following link.
http://www.photo-mark.com/notes/2009/jan/19/analyzing-photoshop-vibrance-and-saturation/
it seems for me that the vibrance effect controls the saturation channel on HSB or HSV colormodel with gamma adjustment.

Related

OpenCV image processing in android

Please check out the image links and can you please suggest the best possible way to detect the ball in the image? I tried edge detection with contours, hough circles and most of the regular ways probably but I get too much background noise.
Can someone please suggest a way to detect the ball in both of the linked images?
https://i.stack.imgur.com/zuLa7.jpg
http://imgur.com/a/nsOSU
Sure.
I have detected the colored object with HSV feature before.
I converted RGB image to HSV image and then detect the object with using the range of hue for the target color.
After threshold with range of hue(inrange), find contour function of OpenCV was used.
In this case, the color detection would be useful rather the shape features.
I have worked such project before, and I have solved this in HSV space.
At first, I converted the image from RGB to HSV.
And then create binary image with threshold function for target color range.
At last, located the position of object(ball) with Hough Circle detect function.
Please check follow, it would be help you, I think:
http://www.pyimagesearch.com/2014/08/04/opencv-python-color-detection/
Thanks.

Detect eye ball

I am developing an app which will change the color of your eye. I need some help about detecting eye ball. Currently i have a selector that will be used to reduce ROI. It look like
this
So who we can detect eye ball from that selected region. I was thinking about changing the image to grayscale and then detect big black spot from that and then change color of it which will be the next step. i'll really appreciate any help.
Your way of thinking about a returning pattern is a good start. I am doing some work on a pattern recognition chair as well, so here is some help for your task:
using a grayscale is a good start btw ;)
There are some "facts" that are always applicable to a non pathologic eye:
the center is dark
left and right side surrounding dark ball are almost white (depends on how open the eye is)
do not forget: you have 2 eyes. link them together in some way (usually they are on an approximately horizontal line)
there is usually motion in the eyes while the other regions of the picture are relatively calm
Of course I cannot provide any code here, this would blast this whole post, but I hope I could help you in some way.
I found some link these guys detecting pupil of the eye. May b this will help you . See here and here
you could use the template matching method from open cv. template matching
this will help you find the eye in most of the cases.
Another solution would be to convert your image into an edge image with e.g. canny edge detector from opencv. and then search for this pattern with the template matcher. Using the edges makes you independent of the color. Using grayscale images will also facilitate the procedure.

Android: how to add blush on face

I have worked on face detection and use http://www.milbo.users.sonic.net/stasm/ for landmark detection.
I have detected all face landmarks, now i want to add simple red blush on cheek.
I have prepared image for and overlap on cheek, it work with white face but when i use dark face then it show me like jokar, which it not corrrent,so the blushing should be depends on skin color.if there any way to dynamic image as attached.
Can any one let me know how can i do that.
Thank you in advance.
Not a precise answer, but I hope it guides you on the right direction:
Use a Paint with a Shader using Overlay or Multiply to blend the face bitmap with the blush bitmap
Try using cv2.seamlessClone() function, it has pretty good results at embedding pictures after alpha blending. I'm sure it will look much better.

Implementing Oil Painting effect in android

i am trying to implement some photo effects i try different effect like sketch painting effect, Emboss effect,
and now i m trying to implement Oil Painting Effect.
i found this link
http://supercomputingblog.com/graphics/oil-painting-algorithm/
but at my level this to hard to understand plz help me in this, or any other reference link for it.
Download JHLabs Library for Android from the following link.
https://code.google.com/p/android-jhlabs/
https://code.google.com/p/android-jhlabs/downloads/list
There are the effects given for oil painting, Emboss nad many more.
You can create pencil sketch effect from DoG Filter followed by GrayScale given in the library.
I think oil paintings are simulated best using a technique called "Stroke Based Rendering" (SBR) pioneered by Aaron Hertzmann. It's been around for a long time. Whether you do this in android or any other os doesn't make much of a difference.
What you need is a function that takes a rectangle and an orientation, and place a brush stroke on the current canvas. The brush itself is defined as a set of 2 texture grayscale images: one for the opacity and one for the height. You need one for the height so that you can use create a bump map alongside the canvas (the rendered image). Now, the tough part is to get good texture maps for your brushes so that it looks realistic. That's where you need to experiment quite a bit and see what you like best. Everybody has its own idea of what looks best.
To define the rectangle and its orientation, you can use image moments. The end result is that your brush strokes will kinda follow the contours of objects, which is usually what artists do (not always though).
In any case, this methodology is better explained here (this is link to my blog):
http://3dstereophoto.blogspot.com/2018/07/non-photorealistic-rendering-software.html
You can try the software called "The Painter" which I wrote (free and works on windows 64 bit) to see what can be done using SBR. Maybe it's not what you want at all. Here's the link to the software (also includes toon shading and watercolor rendering):
http://3dstereophoto.blogspot.com/p/painting-software.html
Again, this is a link to my blog which deals primarily with 3d photography. I happen to also like painting a lot.

Changing texture brightness on Android in Opengl-es

Firstly I must say I'm green as grass in opengl subject.
I'm writing simple 2-d game for android using opengl-es. I use GL11Ext.glDrawTexfOES() to draw the textures (just like in one sample code named 'sprite-method-test'), and gl.glColor4f to color them (and set transparency). But I'm completely helpless if I need apply some brightness or contrast to the rendering texture.
I really appreciate any help.

Categories

Resources