I found many ways to detect different shapes. But hard luck when I am going for a physical object. From what I read we should have a black border around images to make a pattern file. If I follow this concept and generate a pattern then my application detects images on printout. But in the real world a physical object not necessarily has a black border square shape around it.
Although I accept an answer, my question remains unsolved. As there is still no solution for detecting physical object.
Any further research and links are welcome!