- else if(strcmp(new_argv[c], "produce-materials") == 0) {
- cout << "-- PRODUCING MATERIALS -----------------------------------------------" << endl;
-
- check(hierarchy_pool, "No hierarchy pool available.");
- check(test_pool, "No test pool available.");
-
- PoseCellHierarchy *hierarchy;
-
- cout << "Creating hierarchy" << endl;
-
- hierarchy = new PoseCellHierarchy(hierarchy_pool);
-
- LabelledImage *image;
- for(int p = 0; p < test_pool->nb_images(); p++) {
- image = test_pool->grab_image(p);
- if(image->width() == 640 && image->height() == 480) {
- PoseCellSet pcs;
- hierarchy->add_root_cells(image, &pcs);
- cout << "WE HAVE " << pcs.nb_cells() << " CELLS" << endl;
- exit(0);
- test_pool->release_image(p);
- }
- }
-
- delete hierarchy;
-
- }
-