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

Function copyFloat2Map

src/aliceVision/depthMap/depthMapUtils.cpp:23–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21namespace depthMap {
22
23void copyFloat2Map(image::Image<float>& out_mapX,
24 image::Image<float>& out_mapY,
25 const CudaHostMemoryHeap<float2, 2>& in_map_hmh,
26 const ROI& roi,
27 int downscale)
28{
29 const ROI downscaledROI = downscaleROI(roi, downscale);
30 const int width = int(downscaledROI.width());
31 const int height = int(downscaledROI.height());
32
33 // resize output images
34 out_mapX.resize(width, height);
35 out_mapY.resize(width, height);
36
37 // copy image from host memory to output images
38 for (int x = 0; x < width; ++x)
39 {
40 for (int y = 0; y < height; ++y)
41 {
42 const float2& value = in_map_hmh(size_t(x), size_t(y));
43 out_mapX(y, x) = value.x;
44 out_mapY(y, x) = value.y;
45 }
46 }
47}
48
49void copyFloat2Map(image::Image<float>& out_mapX,
50 image::Image<float>& out_mapY,

Callers 2

writeFloat2MapFunction · 0.70

Calls 6

downscaleROIFunction · 0.85
widthMethod · 0.45
heightMethod · 0.45
resizeMethod · 0.45
getSizeMethod · 0.45
copyFromMethod · 0.45

Tested by

no test coverage detected