Click here to Skip to main content
15,898,035 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How do I know if there is a computer camera or no, I use OpenCV 2.3
Posted
Comments
Mohibur Rashid 17-Jul-11 0:13am    
What is computer camera?

Ask your question clearly

1 solution

Using OpenCV I believe you could just do:

CvCapture* cap = cvCaptureFromCAM(0);
if(!cap)
{
   printf("no camera or can't connect to camera...\n");
}
 
Share this answer
 
Comments
OriginalGriff 19-Jul-11 3:31am    
The OP posted as an answer:
"and if cam is busy? for busy cam it's not work"
"I'm sorry but I can't find it in documentation OpencV. Only this variant if(!cap)"
(I have deleted the spurious answer)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900