| 644 | } |
| 645 | |
| 646 | void TutorialApplication::compareToReferenceImage(const FileName& fileName) |
| 647 | { |
| 648 | resize(width,height); |
| 649 | ISPCCamera ispccamera = camera.getISPCCamera(width,height); |
| 650 | initRayStats(); |
| 651 | |
| 652 | for (unsigned int i=0; i<numFrames; i++) |
| 653 | render(pixels,width,height,render_time,ispccamera); |
| 654 | |
| 655 | Ref<Image> image = new Image4uc(width, height, (Col4uc*)pixels); |
| 656 | Ref<Image> reference = loadImage(fileName); |
| 657 | const double error = compareImages(image,reference); |
| 658 | if (error > referenceImageThreshold) // error corresponds roughly to number of pixels that are completely off in color |
| 659 | throw std::runtime_error("reference image differs by " + std::to_string(error)); |
| 660 | } |
| 661 | |
| 662 | void TutorialApplication::set_parameter(size_t parm, ssize_t val) { |
| 663 | rtcSetDeviceProperty(nullptr,(RTCDeviceProperty)parm,val); |
nothing calls this directly
no test coverage detected