template-matching

Logo recognition - how to improve performance

廉价感情. 提交于 2019-11-30 16:00:36
问题 I am working on a project of recognizing TV Channels. I am taking photos of the channels suck that i try to avoid the background and to take the sample from the center of the logo. I recognize 4 different logos, here are the templates: How does my template matching algorithm work: Given 4 templates of size 100x100, each representing a different TV Channel, each having a different threshold (of probability). The user is capturing the logo from the TV set, and then the algorithm is: - Run 4

Logo recognition - how to improve performance

…衆ロ難τιáo~ 提交于 2019-11-30 15:57:04
I am working on a project of recognizing TV Channels. I am taking photos of the channels suck that i try to avoid the background and to take the sample from the center of the logo. I recognize 4 different logos, here are the templates: How does my template matching algorithm work: Given 4 templates of size 100x100, each representing a different TV Channel, each having a different threshold (of probability). The user is capturing the logo from the TV set, and then the algorithm is: - Run 4 independent template matching on each template to receive the probability for each template to match the

Real-time template matching - OpenCV, C++

蹲街弑〆低调 提交于 2019-11-30 02:25:42
I am trying to implement real-time tracking using templates. I wish to update the template with every frame. The main modifications I have done are: 1) separated the template matching and minmaxLoc into separate modules namely, TplMatch() and minmax() functions, respectively. 2) Inside the track() function, the select_flag is kept always true so that new template is copied to 'myTemplate' with every iteration. 3) The last 3 lines of function track() are to update the template (roiImg). 4) Also, I have removed any arguments to track() function, since, img and roiImg are global variables and

Matching object outer shape using normalized cross correlation

喜夏-厌秋 提交于 2019-11-29 23:04:23
问题 I am working with normxcorr2 function in Matlab for template matching. However, what I want to do is different from what normxcorr2 does. The built-in normxcorr2 computes cross-correlation taking into account all the pixels in a rectangular template. But I only want certain pixels to participate in the normalized cross correlation process. For example, I want only the ring-like white region in the following image to be used as a template while correlating. (the black region inside should not

Matching template imge(scaled) to Main/larger image

不问归期 提交于 2019-11-29 14:59:46
问题 I want to find/check subImage/template image in main image and want to know its coordinates, I have used code given at following link to implement it, Check presence of subimage in image in iOS It is working fine, if the size of the template image is exactly same as size of the matching part of larger image. But it is not giving result properly if the subimage is scaled down or scaled up than matching part of larger image. 回答1: Use OpenCV Feature Detection. it is more accurate than template

How can I perform Template Matching process in SUB-IMAGE extracted from ORIGINAL-IMAGE and Display the results in Original Image

送分小仙女□ 提交于 2019-11-29 10:57:41
One whole day I have tried a lot to get all the related matches (with matchtemplate function) in sub-Image , which is ROI i have already extracted from the original image with the mousecallback function. So my code is below for the Matchingfunction ////Matching Function void CTemplate_MatchDlg::OnBnTemplatematch() { namedWindow("reference",CV_WINDOW_AUTOSIZE); while(true) { Mat ref = imread("img.jpg"); // Original Image mod_ref = cvCreateMat(ref.rows,ref.cols,CV_32F);// resizing the image to fit in picture box resize(ref,mod_ref,Size(),0.5,0.5,CV_INTER_AREA); Mat tpl =imread("Template.jpg"); /

Template matching from a screenshot of a window

耗尽温柔 提交于 2019-11-29 08:18:48
What I've done I have a small template image which is meant to be used to find coordinates of matching subimages within a larger screenshot image. The screenshot itself is captured into a memory DC with the help of BitBlt , then converted into a cv::Mat via GetDIBits , like so: HDC windowDc = GetWindowDC(hwndTarget); HDC memDc = CreateCompatibleDC(windowDc); // ... HBITMAP hbmp = CreateCompatibleBitmap(windowDc, width, height); SelectObject(memDc, hbmp); BITMAPINFOHEADER bi = { sizeof(BITMAPINFOHEADER), // biSize width, // biWidth -height, // biHeight 1, // biPlanes 32, // biBitCount BI_RGB, /

What does size and response exactly represent in a SURF keypoint?

点点圈 提交于 2019-11-28 16:14:49
I'm using OpenCV 2.3 for keypoints detection and matching. But I am a bit confused with the size and response parameters given by the detection algorithm. What do they exactly mean? Based on the OpenCV manual, I can't figure it out: float size : diameter of the meaningful keypoint neighborhood float response : the response by which the most strong keypoints have been selected. Can be used for further sorting or subsampling I thought the best point to track would be the one with the highest response but it seems that it is not the case. So how could I subsample the set of key points returned by

Template matching from a screenshot of a window

烈酒焚心 提交于 2019-11-28 01:43:08
问题 What I've done I have a small template image which is meant to be used to find coordinates of matching subimages within a larger screenshot image. The screenshot itself is captured into a memory DC with the help of BitBlt , then converted into a cv::Mat via GetDIBits , like so: HDC windowDc = GetWindowDC(hwndTarget); HDC memDc = CreateCompatibleDC(windowDc); // ... HBITMAP hbmp = CreateCompatibleBitmap(windowDc, width, height); SelectObject(memDc, hbmp); BITMAPINFOHEADER bi = { sizeof

What does size and response exactly represent in a SURF keypoint?

余生颓废 提交于 2019-11-27 09:37:45
问题 I'm using OpenCV 2.3 for keypoints detection and matching. But I am a bit confused with the size and response parameters given by the detection algorithm. What do they exactly mean? Based on the OpenCV manual, I can't figure it out: float size : diameter of the meaningful keypoint neighborhood float response : the response by which the most strong keypoints have been selected. Can be used for further sorting or subsampling I thought the best point to track would be the one with the highest