First you say "i couldn't find black objects" then you say "i am getting only black objects". Can you explain this contradiction? Do you know how to find black objects or not?
You do not need to invert images, you can simply flip the greater than or less than sign:
darkObjects = grayImage < someThresholdValue;
brightObjects = grayImage > someThresholdValue;
To detect "all" objects, you're going to have to tell us what an object is. If you're pointing your webcam around your lab, is an object a molecule? Is it dark things, bright things, or just things that are different than their local background? Upload an image and tell us where you posted it.