Author Options:

Webcam and object? Answered

Hello experts,

I have this code which works so perfect while detecting square objects from images which are downloaded from internet. However, when I am taking the image of a square object from my webcam and processing, its not turning out to be as expected. I am suspecting, the reason could be due to the green and pink hues which are dominantly captured from webcam. The actual output which is being obtained is that there are squares distributed at random places. What do you all suggest?

PS http://i49.tinypic.com/2lw8xw0_th.jpg here, only one circle should be there around the white circular object thats being held.




6 years ago

It could be struggling with the low lighting or the low resolution of the picture. Find some similar pictures from the internet to test this.

You are processing a still image correct, not trying to do it streaming?


Answer 6 years ago

Is there a way to improve lighting or resolution using webcam?

"You are processing a still image correct, not trying to do it streaming?"
Well I basically take snap shot from the webcam and then matlab processes the snap shot itself. So this is the basic idea.
What do you suggest?


Answer 6 years ago

What field of view does the image represent ? Is that the whole field of the camera, or have you cropped the image. Its quite low resolution.


Answer 6 years ago

You can improve the lighting by adding more lights or, possibly, by preprocessing the stream. The only way to improve resolution is to buy a better Web Cam. Some even have built in leds, often visible and infrared.
So essentially you're processing snapshots which I think is your best bet. If better images doesn't fix the problem then the issue is in the code.