void testNonMinimal(void) { G12Buffer *image = BufferFactory::getInstance()->loadG12Bitmap("data/pair/image0001_c0.pgm"); ASSERT_TRUE(image, "Could not open test image\n"); ASSERT_TRUE(image->verify(),"Input image is corrupted"); DerivativeBuffer *result = new DerivativeBuffer(image); G12Buffer *filtered = result->nonMaximalSuppression(); BMPLoader *loader = new BMPLoader(); RGB24Buffer *toSave = new RGB24Buffer(filtered); loader->save("proc111.bmp", toSave); cout << "Saved result"; delete result; delete filtered; delete toSave; delete loader; delete image; }
void testBilinerTransform (void) { Matrix33 inverseLeftMatrix( 1, 0, -13, 0, 1, -9.5, 0, 0, 1); ProjectiveTransform inverseLeft(inverseLeftMatrix); G12Buffer *image = BufferFactory::getInstance()->loadG12Bitmap("data/pair/image0001_c0.pgm"); ASSERT_TRUE(image, "Could not open test image\n"); ASSERT_TRUE(image->verify(),"Input image is corrupted"); G12Buffer *buffer1Transformed = image->doReverseTransform<ProjectiveTransform>(&inverseLeft, image->h, image->w); ASSERT_TRUE(buffer1Transformed->verify(),"Result image is corrupted"); BMPLoader *loader = new BMPLoader(); RGB24Buffer *toSave = new RGB24Buffer(buffer1Transformed); loader->save("proc.bmp", toSave); delete toSave; delete loader; delete buffer1Transformed; delete image; }