MCPcopy Create free account
hub / github.com/alicevision/AliceVision / computeAndWriteNormalMap

Method computeAndWriteNormalMap

src/aliceVision/depthMap/Refine.cpp:274–289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

272}
273
274void Refine::computeAndWriteNormalMap(const Tile& tile, const CudaDeviceMemoryPitched<float2, 2>& in_depthSimMap_dmp, const std::string& name)
275{
276 // downscale the region of interest
277 const ROI downscaledRoi = downscaleROI(tile.roi, _refineParams.scale * _refineParams.stepXY);
278
279 // get R device camera parameters id from cache
280 DeviceCache& deviceCache = DeviceCache::getInstance();
281 const int rcDeviceCameraParamsId = deviceCache.requestCameraParamsId(tile.rc, _refineParams.scale, _mp);
282
283 ALICEVISION_LOG_INFO(tile << "Refine compute normal map of view id: " << _mp.getViewId(tile.rc) << ", rc: " << tile.rc << " (" << (tile.rc + 1)
284 << " / " << _mp.ncams << ").");
285
286 cuda_depthSimMapComputeNormal(_normalMap_dmp, in_depthSimMap_dmp, rcDeviceCameraParamsId, _refineParams.stepXY, downscaledRoi, _stream);
287
288 writeNormalMap(tile.rc, _mp, _tileParams, tile.roi, _normalMap_dmp, _refineParams.scale, _refineParams.stepXY, name);
289}
290
291void Refine::exportVolumeInformation(const Tile& tile, const std::string& name) const
292{

Callers

nothing calls this directly

Calls 4

downscaleROIFunction · 0.85
requestCameraParamsIdMethod · 0.80
writeNormalMapFunction · 0.70
getViewIdMethod · 0.45

Tested by

no test coverage detected