add test code for opencv