Пример #1
0
		House1() {

			fileLeft = "/apps/workspaces/kiste_data/stereo/4/left.png";
			fileRight = "/apps/workspaces/kiste_data/stereo/4/right.png";
			imgLeft = ImageFactory::readPNG(fileLeft);
			imgRight = ImageFactory::readPNG(fileRight);

			MatchingSAD sad(imgLeft, imgRight, 15);
			Matching matcher;

			Point2i pl1(110,244);	Point2i pr1(198,296);		//pr1 = matcher.refine(sad, pl1, pr1);
			Point2i pl2(273,242);	Point2i pr2(309,249);		//pr2 = matcher.refine(sad, pl2, pr2);
			Point2i pl3(88,117);	Point2i pr3(129,121);		//pr3 = matcher.refine(sad, pl3, pr3);
			Point2i pl4(247,122);	Point2i pr4(244,89);		//pr4 = matcher.refine(sad, pl4, pr4);
			Point2i pl5(321,100);	Point2i pr5(320,50);		//pr5 = matcher.refine(sad, pl5, pr5);
			Point2i pl6(398,162);	Point2i pr6(428,125);		//pr6 = matcher.refine(sad, pl6, pr6);
			Point2i pl7(393,282);	Point2i pr7(424,273);		//pr7 = matcher.refine(sad, pl7, pr7);
			Point2i pl8(266,154);	Point2i pr8(278,132);		//pr8 = matcher.refine(sad, pl8, pr8);

			fm.addCorrespondence(pl1,	pr1);
			fm.addCorrespondence(pl2,	pr2);
			fm.addCorrespondence(pl3,	pr3);
			fm.addCorrespondence(pl4,	pr4);
			fm.addCorrespondence(pl5,	pr5);
			fm.addCorrespondence(pl6,	pr6);
			fm.addCorrespondence(pl7,	pr7);
			fm.addCorrespondence(pl8,	pr8);
			//fm.addCorrespondence(pl9,	pr9);

			fm.estimate();

		}
Пример #2
0
		Metal1() {

			fileLeft = "/apps/workspaces/kiste_data/stereo/3/left.png";
			fileRight = "/apps/workspaces/kiste_data/stereo/3/right.png";
			imgLeft = ImageFactory::readPNG(fileLeft);
			imgRight = ImageFactory::readPNG(fileRight);

			MatchingSAD sad(imgLeft, imgRight, 15);
			Matching matcher;

			Point2i pl1(608,834);	Point2i pr1(400,873);		//pr1 = matcher.refine(sad, pl1, pr1);
			Point2i pl2(357,485);	Point2i pr2(292,470);		//pr2 = matcher.refine(sad, pl2, pr2);
			Point2i pl3(461,672);	Point2i pr3(294,678);		//pr3 = matcher.refine(sad, pl3, pr3);
			Point2i pl4(524,507);	Point2i pr4(410,523);		//pr4 = matcher.refine(sad, pl4, pr4);
			Point2i pl5(518,479);	Point2i pr5(440,493);		//pr5 = matcher.refine(sad, pl5, pr5);
			Point2i pl6(586,405);	Point2i pr6(476,431);		//pr6 = matcher.refine(sad, pl6, pr6);
			Point2i pl7(593,324);	Point2i pr7(532,349);		//pr7 = matcher.refine(sad, pl7, pr7);
			Point2i pl8(673,366);	Point2i pr8(596,405);		//pr8 = matcher.refine(sad, pl8, pr8);

			fm.addCorrespondence(pl1,	pr1);
			fm.addCorrespondence(pl2,	pr2);
			fm.addCorrespondence(pl3,	pr3);
			fm.addCorrespondence(pl4,	pr4);
			fm.addCorrespondence(pl5,	pr5);
			fm.addCorrespondence(pl6,	pr6);
			fm.addCorrespondence(pl7,	pr7);
			fm.addCorrespondence(pl8,	pr8);
			//fm.addCorrespondence(pl9,	pr9);

			fm.estimate();

		}
Пример #3
0
		IDIS() {

			fileLeft = "/apps/workspaces/kiste_data/stereo/2/left.png";
			fileRight = "/apps/workspaces/kiste_data/stereo/2/right.png";
			imgLeft = ImageFactory::readPNG(fileLeft);
			imgRight = ImageFactory::readPNG(fileRight);

			MatchingSAD sad(imgLeft, imgRight, 15);
			Matching matcher;

			Point2i pl1(257,369);	Point2i pr1(98,367);		pr1 = matcher.refine(sad, pl1, pr1);
			Point2i pl2(261,579);	Point2i pr2(101,589);		pr2 = matcher.refine(sad, pl2, pr2);
			Point2i pl3(282,692);	Point2i pr3(121,708);		pr3 = matcher.refine(sad, pl3, pr3);
			Point2i pl4(657,673);	Point2i pr4(520,678);		pr4 = matcher.refine(sad, pl4, pr4);
			Point2i pl5(704,247);	Point2i pr5(569,247);		pr5 = matcher.refine(sad, pl5, pr5);
			Point2i pl6(816,641);	Point2i pr6(679,641);		pr6 = matcher.refine(sad, pl6, pr6);
			Point2i pl7(1113,503);	Point2i pr7(964,501);		pr7 = matcher.refine(sad, pl7, pr7);
			Point2i pl8(1025,472);	Point2i pr8(882,472);		pr8 = matcher.refine(sad, pl8, pr8);
			Point2i pl9(1096,345);	Point2i pr9(948,348);		pr9 = matcher.refine(sad, pl9, pr9);

			fm.addCorrespondence(pl1,	pr1);
			fm.addCorrespondence(pl2,	pr2);
			fm.addCorrespondence(pl3,	pr3);
			fm.addCorrespondence(pl4,	pr4);
			fm.addCorrespondence(pl5,	pr5);
			fm.addCorrespondence(pl6,	pr6);
			fm.addCorrespondence(pl7,	pr7);
			fm.addCorrespondence(pl8,	pr8);
			//fm.addCorrespondence(pl9,	pr9);

			fm.estimate();

		}
Пример #4
0
		House3D() {

			fileLeft = "/apps/workspaces/kiste_data/stereo/5/left.png";
			fileRight = "/apps/workspaces/kiste_data/stereo/5/right.png";
			imgLeft = ImageFactory::readPNG(fileLeft);
			imgRight = ImageFactory::readPNG(fileRight);


//			imgLeft = Derivative::getX(imgLeft);
//			imgRight = Derivative::getX(imgRight);

//			Normalize::inplace(imgLeft);
//			Normalize::inplace(imgRight);

			MatchingSAD sad(imgLeft, imgRight, 15);
			Matching matcher;

			Point2i pl1(245,381);	Point2i pr1(176,366);		//pr1 = matcher.refine(sad, pl1, pr1);		// h1 lower left
			Point2i pl2(308,323);	Point2i pr2(312,323);		//pr2 = matcher.refine(sad, pl2, pr2);		// h1 lower right
			Point2i pl3(222,82);	Point2i pr3(246,82);		//pr3 = matcher.refine(sad, pl3, pr3);		// h1 upper right
			Point2i pl4(134,76);	Point2i pr4(101,78);		//pr4 = matcher.refine(sad, pl4, pr4);		// h1 upper left
			Point2i pl5(501,218);	Point2i pr5(416,228);		//pr5 = matcher.refine(sad, pl5, pr5);		// h1 mid left
			Point2i pl6(620,201);	Point2i pr6(625,219);		//pr6 = matcher.refine(sad, pl6, pr6);		// h1 mid right
			Point2i pl7(546,83);	Point2i pr7(570,78);		//pr7 = matcher.refine(sad, pl7, pr7);		// h1 upper right
			Point2i pl8(423,79);	Point2i pr8(378,77);		//pr8 = matcher.refine(sad, pl8, pr8);		// h1 upper left

			Point2i pl9(381,413);	Point2i pr9(319,420);		//pr8 = matcher.refine(sad, pl8, pr8);		// cube1a
			Point2i plA(153,322);	Point2i prA(68,299);		//pr8 = matcher.refine(sad, pl8, pr8);		// cube2
			Point2i plB(348,361);	Point2i prB(294,362);		//pr8 = matcher.refine(sad, pl8, pr8);		// cube1b


//			Point2i pl1(242,219);	Point2i pr1(171,212);		//pr1 = matcher.refine(sad, pl1, pr1);		// h1 lower left
//			Point2i pl2(307,194);	Point2i pr2(311,194);		//pr2 = matcher.refine(sad, pl2, pr2);		// h1 lower right
//			Point2i pl3(222,82);	Point2i pr3(246,82);		//pr3 = matcher.refine(sad, pl3, pr3);		// h1 upper right
//			Point2i pl4(134,76);	Point2i pr4(101,78);		//pr4 = matcher.refine(sad, pl4, pr4);		// h1 upper left
//			Point2i pl5(501,218);	Point2i pr5(416,228);		//pr5 = matcher.refine(sad, pl5, pr5);		// h1 lower left
//			Point2i pl6(620,201);	Point2i pr6(625,219);		//pr6 = matcher.refine(sad, pl6, pr6);		// h1 lower right
//			Point2i pl7(546,83);	Point2i pr7(570,78);		//pr7 = matcher.refine(sad, pl7, pr7);		// h1 upper right
//			Point2i pl8(423,79);	Point2i pr8(378,77);		//pr8 = matcher.refine(sad, pl8, pr8);		// h1 upper left

			fm.addCorrespondence(pl1,	pr1);
			fm.addCorrespondence(pl2,	pr2);
			fm.addCorrespondence(pl3,	pr3);
			fm.addCorrespondence(pl4,	pr4);
			fm.addCorrespondence(pl5,	pr5);
			fm.addCorrespondence(pl6,	pr6);
			fm.addCorrespondence(pl7,	pr7);
			fm.addCorrespondence(pl8,	pr8);
			fm.addCorrespondence(pl9,	pr9);

			fm.addCorrespondence(plA,	prA);
			fm.addCorrespondence(plB,	prB);

			fm.estimate();

		}
Пример #5
0
int main(int argc, char **argv){

    Gtk::Main     kit (argc, argv);
    Gtk::Window   win;
    GObjTestTile  pl2(true);

    DThreadViewer viewer(&pl2);

    win.add(viewer);
    win.set_default_size(640,480);
    win.show_all();

    kit.run(win);
}
Пример #6
0
int main()
{
	CMyList lst;
	CPlorg pl1("Plorg1", 100);
	CPlorg pl2("Plorg2", 200);
	CPlorg pl3("Plorg3", 300);
	lst + &pl1;
	lst + &pl2;
	lst + &pl3;
	lst.GetItem(2)->ShowData();
	lst.GetItem(2)->ChangeCI(500);
	lst.GetItem(2)->ShowData();
	lst.operator-();
	lst.GetItem(2);

	std::cin.get();
	return 0;
}
Пример #7
0
		Garden() {

			fileLeft = getDataFile("stereo1.jpg");		// left image
			fileRight = getDataFile("stereo2.jpg");		// right image
			imgLeft = ImageFactory::readJPEG(fileLeft);
			imgRight = ImageFactory::readJPEG(fileRight);

			MatchingSAD sad(imgLeft, imgRight, 15);
			Matching matcher;

			// image1				// image2 (left of image1)	// refine the approximate matching positions
			Point2i pl1(85,53);		Point2i pr1(29,57);			pr1 = matcher.refine(sad, pl1, pr1);
			Point2i pl2(264,34);	Point2i pr2(209,36);		pr2 = matcher.refine(sad, pl2, pr2);
			Point2i pl3(362,32);	Point2i pr3(306,32);		pr3 = matcher.refine(sad, pl3, pr3);

			Point2i pl4(213,155);	Point2i pr4(155,159);		pr4 = matcher.refine(sad, pl4, pr4);

			Point2i pl5(96,209);	Point2i pr5(36,210);		pr5 = matcher.refine(sad, pl5, pr5);
			Point2i pl6(330,212);	Point2i pr6(269,211);		pr6 = matcher.refine(sad, pl6, pr6);
			Point2i pl7(276,241);	Point2i pr7(216,242);		pr7 = matcher.refine(sad, pl7, pr7);

			Point2i pl8(385,332);	Point2i pr8(321,328);		pr8 = matcher.refine(sad, pl8, pr8);
			Point2i pl9(180,389);	Point2i pr9(114,388);		pr9 = matcher.refine(sad, pl9, pr9);
			Point2i pl10(136,500);	Point2i pr10(67,500);		pr10 = matcher.refine(sad, pl10, pr10);

			fm.addCorrespondence(pl1,	pr1);
			fm.addCorrespondence(pl2,	pr2);
			fm.addCorrespondence(pl3,	pr3);

			fm.addCorrespondence(pl4,	pr4);

			fm.addCorrespondence(pl5,	pr5);
			fm.addCorrespondence(pl6,	pr6);
			fm.addCorrespondence(pl7,	pr7);
			fm.addCorrespondence(pl8,	pr8);
//			fm.addCorrespondence(pl9,	pr9);
//			fm.addCorrespondence(pl10,	pr10);

			fm.estimate();

		}