Ejemplo n.º 1
0
Archivo: p4.c Proyecto: haywood/Vision1
int main(int argc, char *argv[])
{
	char *iim, *idb, * oim;
	ObjectDB newobjs, known;
	Image im;

	if (argc != 4) {
		fprintf(stderr, "usage: %s <input labeled image> <input database> <output image>", argv[0]);
	}

	iim=argv[1];
	idb=argv[2];
	oim=argv[3];

	readImage(&im, iim);
	readDatabase(&known, idb); /* get the database of known objects */
	makeODB(&newobjs, getColors(&im)); /* create the database for the input image */
	getObjects(&im, &newobjs); /* fill the database for the input image */
	filterObjects(&im, &newobjs, &known); /* find known objects in the database and throw away those unknown */
	drawLines(&im, &newobjs); /* draw lines in the input image */
	writeImage(&im, oim); /* write the output image */

	free(newobjs.objs);
	free(known.objs);
	free(im.data);

	return 0;
}
Ejemplo n.º 2
0
std::pair<DetectionResult, DetectionIterator&> ViewDetection::detectObjects() {
	//Ogre::ResourceGroupManager::getSingletonPtr();
	//Ogre::OverlayManager* mg = Ogre::OverlayManager::getSingletonPtr();
	//Ogre::Overlay* ov = mg->getByName("TestScriptOverlay");

	Ogre::RaySceneQuery* rayQuery = viewManager->createRayQuery(*detection);
	rayQuery->setSortByDistance(true);

	DetectionResult result = rayQuery->execute();
	DetectionIterator& endOfResult = filterObjects(result);

	return std::make_pair(result, endOfResult);
}
ObjectTrajectoryProcessing::ObjectTrajectoryProcessing(QString inputFile, QString outputFile)
{
    loadObjects(inputFile);
    filterObjects();
    dumpObjects(outputFile);
}