Info
この質問は閉じられています。 編集または回答するには再度開いてください。
program for calculating skin probability not working. please help.
3 ビュー (過去 30 日間)
古いコメントを表示
I was making a program using gmdistribution. But, it is giving error at the gmdistribution command. I saw the algo of this on internet itself and tried it.
The program is :
frame20 = double(imread('image6.jpg'));
[rows,cols,bands] = size(frame20);
skin_detection = zeros(rows, cols);
for row = 1:rows
for col = 1:cols
red = frame20(row, col, 1);
green = frame20(row, col, 2);
blue = frame20(row, col, 3);
r = gmdistribution(red_mean, red_std, red); red_pr=pdf(r,red);
g = gmdistribution(green_mean, green_std, green) green_pr=pdf(g,green);
b = gmdistribution(blue_mean, blue_std, blue); blue_pr=pdf(b,blue);
prob = red_pr .* green_pr .* blue_pr; skin_detection(row, col)= prob;
end
end
This is giving error:
??? Error using ==> gmdistribution.gmdistribution>gmdistribution.gmdistribution at 158 The mixing proportions must be positive.
Error in ==> trial_gauss_fullimage at 51 g = gmdistribution(green_mean, green_std, green); Error in ==> trial_gauss_fullimage at 52 green_pr=pdf(g,green);
The name of my file is trial_gauss_fullimage.
In this the mean and std values of red, green and blue it calculated and these are 1*1 matrix i.e. constant one value eg. red_mean is 237.2865 and red_std is 13.8627. Same holds for red also.
I hope I have been able to explain my problem. If you can help me out it would be great.
Thanks,
Nidhi
0 件のコメント
回答 (1 件)
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!