How to extract human contrast out of any given image?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Ben Title
el 29 de Abr. de 2016
Comentada: Image Analyst
el 29 de Abr. de 2016
Hi, Im trying to extract a human contrast out of any given image. That is, to recieve an image from the user and to create a new image of the silhouette only. I have used some of the tools from the image processing tools, but I have not managed to write something that will work for more then one image. Do you have any suggestions for a good strategy? Ben
0 comentarios
Respuesta aceptada
Image Analyst
el 29 de Abr. de 2016
It really depends on your image. If the human is in front of a uniform background, it's pretty easy. If the human is sitting in a stadium with thousands of other people, it would be pretty hard. If the background is still and the human is moving, it would be pretty easy. If the human is wearing different colored clothes than the background, it would be easy. It would be hard or impossible to find all humans in all possible photos of humans. For example, can you find the humans in these photos: http://www.huffingtonpost.co.uk/2015/12/30/coffee-bean-illusion_n_6105952.html
Usually when people ask for image processing advice, they attach an image.
2 comentarios
Image Analyst
el 29 de Abr. de 2016
So basically you want to detect any human, of any race, of any size/zoom relative to the rest of the picture, with any background whatsoever. You are very ambitious. I imagine this is for your Ph.D. project and you're probably working on CBIR.
First look at https://www.youtube.com/watch?v=iWD0IyK9ddw for a MATLAB demo of CBIR. Then try this https://www.google.com/?gws_rd=ssl#q=CBIR+demo to see online demos and engines that you can try. I can't help you because it is an enormously complex field with lots of brilliant people working on it and it is progressing and improving very rapidly, plus it's not my field.
Más respuestas (1)
John BG
el 29 de Abr. de 2016
Editada: John BG
el 29 de Abr. de 2016
Ben
Have a look to the attached introduction to edge detection with Laplacian: Edge detection - Laplace edge detection algorythm.pdf
got it from
In Mathworks website there are some contour detection start examples:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/174208/image.png)
A=imread('coins.png')
nx=size(A,2);hx=ceil(nx/2)-1
ny=size(A,1);hy=ceil(ny/2)-1
ftdiffx=(2i*pi/nx)*(0:hx) % 1/w ramp to time diff :: illuminating on x axis direction
ftdiffx(nx:-1:nx-hx+1)=-ftdiffx(2:hx+1)
G2=ifft2(bsxfun(@times,fft2(A),ftdiffx))
ftdiffy=(2i*pi/ny)*(0:hy) % illuminating on y axis direction
ftdiffy(ny:-1:ny-hy+1)=-ftdiffy(2:hy+1)
G1=ifft2(bsxfun(@times,fft2(A),ftdiffy'))
figure(1);imshow(A)
figure(2);imshow(G2) % fft(A)/wx
figure(3);imshow(G1) % fft(A)/wy
G2re=real(G2)
G2im=imag(G2)
G2mod=abs(G2)
G2ang=angle(G2)
figure(4);
subplot(2,2,1);imshow(G2re)
subplot(2,2,3);imshow(G2mod)
subplot(2,2,2);imshow(G2im)
subplot(2,2,4);imshow(G2ang)
G1re=real(G1)
G1im=imag(G1)
G1mod=abs(G1)
G1ang=angle(G1)
figure(5);
subplot(2,2,1);imshow(G1re)
subplot(2,2,3);imshow(G1mod)
subplot(2,2,2);imshow(G1im)
subplot(2,2,4);imshow(G1ang)
The Laplacian is a quite effective function to detect contours, try this:
LA=del2(double(A(:,:,1)))
imshow(LA)
LA1=del2(double(A(:,:,1)));
LA2=del2(double(A(:,:,2)));
LA3=del2(double(A(:,:,3)));
If you find this answer of any help solving your question,
please click on the thumbs-up vote link,
thanks in advance
John
0 comentarios
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!