Ask Your Question

M Fahad Minhas's profile - activity

2016-08-16 13:46:48 -0600 received badge  Scholar (source)
2016-08-16 13:46:23 -0600 answered a question How to make image of template matching result

We can crop and get the image of template matching result by using the function subMat(), and providing it the Rect, which is our ROI. We can get the cords. of Rect from the result Mat of template matching method.

2016-08-16 13:44:20 -0600 received badge  Enthusiast
2016-08-09 11:02:14 -0600 commented question How to make image of template matching result

You're berek from my previous question too right?

Significance for me in it is i would get colored part in the Main Image as i had shown previously.

I want to match and extract that colored part.

See here

I want to match and when detected, i want to extract that colored part from Main Image.

2016-08-09 10:24:34 -0600 commented question How to make image of template matching result

We can put rectangle in the image where the template is detected, right? as shown in the link I gave.

I just want to crop that area and make another image of it, how can we do that using the "result" Matrix. We can draw rectangle on it, then surely we would be able to extract it as well, don't we?

2016-08-09 09:39:03 -0600 asked a question How to make image of template matching result

Hi,

I wanted to know that how can we extract the image out of the result we get by matchTemplate method of opencv.

I don't know how to use its location to make an image (colored), we can though put a rectangle on it if matched as shown in the following example, but how can we make a separate image of this rectangle?

TemplateMatchingExample

2016-08-09 05:04:18 -0600 commented question Detect sub-image(Irrespective of scale/angle) and crop that part from main image

The problem is, i need to extract the exact boundary from Main Image as seen in the template image. Extracting contours or convex hull wouldn't be accurate of what i requiree

2016-08-08 10:15:36 -0600 commented question Detect sub-image(Irrespective of scale/angle) and crop that part from main image

I have found the half solution to it.

I can run a SURF algorithm and draw the keypoint in a new image.

Anyone knows from here how can we crop the detected part from Main Image? Is there any API in OpenCV which can make image out of SURF's detected location in main image?

I can attach current code if required.

2016-08-08 08:15:04 -0600 commented question Detect sub-image(Irrespective of scale/angle) and crop that part from main image

But i want to crop that detected colored part.

2016-08-08 08:13:58 -0600 commented question Detect sub-image(Irrespective of scale/angle) and crop that part from main image

Yes you're right, but i have just seen SURF working, it maybe able to detect it even if we put colors and leave the borders.

2016-08-08 08:10:44 -0600 commented question Detect sub-image(Irrespective of scale/angle) and crop that part from main image

That's fine.

But are you talking on behalf of OpenCV itself? If not then can u kindly give the directions for the solution? I'm myself not here for exact code for it, i just needed guide lines, and i guess that is why we can ask a question here. Can you tell if we can do this with OpenCV? regardless of any platform?

2016-08-08 07:58:15 -0600 commented question Detect sub-image(Irrespective of scale/angle) and crop that part from main image

Either way, is there any C# solution? I would gladly convert it in UnityScript if someone has done this kind of thing.

2016-08-08 07:56:40 -0600 commented question Detect sub-image(Irrespective of scale/angle) and crop that part from main image

Are you sure? You can search it in Unity Asset Store, there is a package for around $100 there.

2016-08-08 07:53:03 -0600 received badge  Editor (source)
2016-08-08 07:46:18 -0600 asked a question Detect sub-image(Irrespective of scale/angle) and crop that part from main image

Hi everyone,

This is the issue of matching two images, one is the smaller one and other (main) image is the larger one.

Here, i see it can be done by Template Matching, but template matching cannot be of use here because it doesn't work with scaled or rotated images.

What I want to do is to look for template/sub-image in the bigger image and if it is detected, extract/crop that part from the main (larger) image.

As I am getting main image from camera and i have to look for my template in it, due to camera frame, it can be of different scale and orientation so i need to implement maybe SURF/SIFT and i have no idea how to use it with OpenCV for Unity.

I am attaching sample images.

Kindly help if anyone knows the solution/algorithm for it.

Main Image(Camera Frame)

Template

Here it can be seen that, images can have variance in their size and color. Irrespective of these, how can we detect template and crop that colored part from main image?

Please help.

2016-08-07 07:39:27 -0600 commented question OpenCV for unity template matching

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

Thanks for your reply.

2016-08-06 04:09:43 -0600 asked a question OpenCV for unity template matching

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.

2016-07-19 07:53:21 -0600 commented answer How to detect color during target detection time and put that on the 3D model to be augmented?

:o Yes you're right i guess This is in fact a good idea to just get the frame and cut out the target's region and use the same as texture. Here the problem would be to know the location of target and region to cut because it would be different in every frame. But still I would give it a try, Thanks a lot :)

2016-07-19 05:27:28 -0600 commented answer How to detect color during target detection time and put that on the 3D model to be augmented?

I just need the whole right directions for completing this project for my FYP and I am stuck.

2016-07-19 05:26:07 -0600 received badge  Supporter (source)
2016-07-19 05:25:57 -0600 commented answer How to detect color during target detection time and put that on the 3D model to be augmented?

Thank you for your answer, that is one good hint.

Actually I am having trouble using the OpenCV package for unity with Vuforia SDK. Considering your answer, after doing what you have proposed, from these colors acquired of different colored regions, i need to make the 2D texture out of it and apply that texture to the 3D model of this object and then augment it.

Here is the link that would demonstrate better of what I want to achieve, maybe I am not explaining it correctly. Here is the video link to it.

2016-07-12 14:04:48 -0600 asked a question How to detect color during target detection time and put that on the 3D model to be augmented?

I am working with vuforia's unity package and OpenCV for unity at the same time. My goal is to make the texture of 3D models at the runtime, i.e whatever user colors the target object, that color at the same region should be displayed on its 3D model which is going to be augmented.

I know this can be done using OpenCV with vuforia concurrently but i'm not getting the right direction

Can someone guide me on this?

Kind regards, M Fahad Minhas

2016-07-12 13:05:23 -0600 received badge  Organizer (source)