OpenCV for unity template matching

asked 2016-08-06 04:09:43 -0600

M Fahad Minhas gravatar image

updated 2018-12-27 20:31:35 -0600

Hi everyone,

I am working with OpenCV unity package with Vuforia and there's this issue with familiarizing with the API of OpenCV.

I am getting Camera Frames through Vuforia's API whenever the Image target is detected. In this frame, I also get the environment around my Image Target.

What I want to do is to discard the pixels (that is environment) other than my Image Target and modify the Image accordingly.

Is there any specific method to do this? Or any method which detects the area of Image Target like any BoundingBox property of Image Target?

I think we can do this by Template Matching using OpenCV but I am not getting the right way to do it.

Kindly help if anyone knows the solution to it.

edit retag flag offensive close merge delete

Comments

while we can help you with general opencv topics, problems with unsupported 3rd party wrappers like emgu, javacv or unity are unfortunately off-topic here.

About templateMatching if you match your template you can use a mask with size equale to template size to discard all pixels outside template

LBerger gravatar imageLBerger ( 2016-08-07 03:47:20 -0600 )edit

Yes you're right, as I have a slight idea but I'm having trouble using the API in unity.

Thanks for your reply.

M Fahad Minhas gravatar imageM Fahad Minhas ( 2016-08-07 07:39:27 -0600 )edit