Click here to Skip to main content
15,896,201 members
Articles / Programming Languages / Visual C++ 9.0

Edge Based Template Matching

Rate me:
Please Sign up or sign in to vote.
4.79/5 (61 votes)
5 Aug 2010CPOL8 min read 250.5K   33.3K   122  
Implementing an edge based template matching or pattern matching algorithm.
//***********************************************************************
// Project		    : GeoMatch
// Author           : Shiju P K
// Email			: shijupk@gmail.com
// Created          : 03-07-2010
//
// File Name		: CommandParser.cpp
// Last Modified By : Shiju P K
// Last Modified On : 03-07-2010
// Description      : class to implement comand line parsing
//
// Copyright        : (c) . All rights reserved.
//***********************************************************************
#include "StdAfx.h"
#include "string.h"
#include "CommandParser.h"

// default constucter
CommandParser::CommandParser(void)
{
	numArgs	= 0;
	argList = NULL;
}

CommandParser::~CommandParser(void)
{
}
//constructer to initialize with number of argument and argument list
CommandParser::CommandParser(int _numArgs,char** _argList)
{
	numArgs	= _numArgs;
	argList = _argList;
}

//return argument that curresponds to the key
char* CommandParser::GetParameter(const char *key)
{
	for( int currArg = 0; currArg < numArgs; currArg++ )
	{
  		if( strcmp( key, argList[currArg] ) == 0 )
			return argList[currArg+1];
	}

	return NULL; 
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect
India India
Just passionately curious. My interests includes coding, studying algorithms, image processing, robotics, machine learning, artificial intelligence, aero design and now Big Data.

Comments and Discussions