Results 1 to 8 of 8
- 03-24-2012, 06:08 PM #1
Member
- Join Date
- Feb 2012
- Posts
- 14
- Rep Power
- 0
Help with face detection Viola Jones Algorithm
I'm currently working on a face detection project. And i read the Viola Jones algorithm. Which has a requirement of converting an image to integral image and it also has some features thing. I have been superly confused with what is this feature thing and how it works. If anyone can help it will be greatly appreciated. Kindly explain what are features and how they work.
- 03-24-2012, 07:44 PM #2
Re: Help with face detection Viola Jones Algorithm
How does your question relate to java programming?
If you don't understand my response, don't ignore it, ask a question.
- 03-24-2012, 08:49 PM #3
Member
- Join Date
- Feb 2012
- Posts
- 14
- Rep Power
- 0
Re: Help with face detection Viola Jones Algorithm
May be you can guide me to the best approach for face detection in java.. :/
- 03-24-2012, 08:51 PM #4
Re: Help with face detection Viola Jones Algorithm
Can you explain the algorithm that you want to use. Given an array of pixels what do you want to do?
If you don't understand my response, don't ignore it, ask a question.
- 03-24-2012, 09:02 PM #5
Member
- Join Date
- Feb 2012
- Posts
- 14
- Rep Power
- 0
Re: Help with face detection Viola Jones Algorithm
Look em currently working with YCbCr color model. I have taken rgb values of a pic and converted them to YCbCr. It works fine when em in front of a black background but it is not useful in complex backgrounds. Maybe it is because of the threshold values. Em giving you the code i want your help if you can suggest me correct threshold or the most effective one or some other way of face detection in java.
Java Code:int wid = img.getWidth(); int hei = img.getHeight(); int [] arr1 = new int [3]; arr1[0] = 0; arr1[1]=0; arr1[2]=0; int[] arr = new int[3]; arr[0] = 248; arr[1] = 248; arr[2] = 255; int[][] pixels = new int[wid][hei]; for(int i = 0; i<wid; i++) { for(int j = 0;j<hei;j++) { pixels[i][j] = img.getRGB(i,j); int red = (((pixels[i][j] >> 16) & 0xff)); int green = (((pixels[i][j] >> 8) & 0xff)); int blue = ((pixels[i][j] & 0xff)); int[] y = new int[3]; y[0] = (int) (((0.299*red)+(0.587*green)+(0.114*blue))+16); y[1] = (int) (((-0.169*red)+(-0.331*green)+(0.5*blue))+128); y[2] = (int) (((0.5*red)+(-0.419*green)+(-0.081*blue))+128); if((y[1]>80)&&(y[1]<120)&&(y[2]>133)&&(y[2]<173)) img.getRaster().setPixel(i, j, arr); else img.getRaster().setPixel(i, j, arr1);
Last edited by Norm; 03-24-2012 at 09:03 PM. Reason: added code tags
- 03-24-2012, 09:08 PM #6
Re: Help with face detection Viola Jones Algorithm
can suggest me correct threshold
I'm not familiar with YCbCr
What is the posted code supposed to do? It has a lot of hardcoded/undefined numbers in it. Those should all be used as named variables to help explain what they are being used for.If you don't understand my response, don't ignore it, ask a question.
- 03-24-2012, 09:14 PM #7
Member
- Join Date
- Feb 2012
- Posts
- 14
- Rep Power
- 0
Re: Help with face detection Viola Jones Algorithm
There is only one thing that is not properly defined here and that is img. It is an image which i capture by grabbing frame. A threshold converts image to white and black color in my case skin is marked as white and everything else is black. This code takes RGB values of given image and then convert it to Y "y[0]", Cb "y[1]", and Cr"y[2]". Ycbcr is widely used for skin detection. Is this information enough?
- 03-24-2012, 09:38 PM #8
Similar Threads
-
Geomajas GWT face 1.10.0
By java software in forum Java SoftwareReplies: 0Last Post: 02-05-2012, 07:31 PM -
Smiley Face
By eppoair2 in forum Java AppletsReplies: 6Last Post: 01-07-2012, 10:38 AM -
Face Dections CTS
By rockos in forum Advanced JavaReplies: 2Last Post: 09-17-2011, 10:40 AM -
Let's Check My Collision Detection Algorithm
By Revenna in forum Java 2DReplies: 3Last Post: 03-23-2011, 03:44 PM -
Accuracy Rate of Canny Edge Detection and Sobel Algorithm
By drkeni9ma in forum Forum LobbyReplies: 0Last Post: 09-01-2010, 06:31 AM
Bookmarks