MCPcopy Create free account
hub / github.com/city-super/Octree-GS / getTexture

Method getTexture

SIBR_viewers/src/core/imgproc/MeshTexturing.cpp:175–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173 }
174
175 sibr::ImageRGB::Ptr MeshTexturing::getTexture(uint options) const {
176
177 ImageRGB32F output;
178 if (options & Options::FLOOD_FILL) {
179 output = floodFill(_accum, _mask)->clone();
180 }
181 else if (options & Options::POISSON_FILL) {
182 output = poissonFill(_accum, _mask)->clone();
183 }
184 else {
185 output = _accum.clone();
186 }
187
188 // Convert as-is to uchar.
189 ImageRGB::Ptr result(new ImageRGB());
190 const cv::Mat3f outputF = output.toOpenCV();
191 const cv::Mat3b outputB = cv::Mat3b(outputF);
192 result->fromOpenCV(outputB);
193
194 /// \todo For extra large images, this might crash because of internal openCV indexing limitations.
195 if (options & Options::FLIP_VERTICAL) {
196 result->flipH();
197 }
198
199 return result;
200 }
201
202 sibr::ImageRGB32F::Ptr MeshTexturing::poissonFill(const sibr::ImageRGB32F & image, const sibr::ImageL8 & mask) {
203 SIBR_LOG << "[Texturing] Poisson filling..." << std::endl;

Callers 1

mainFunction · 0.80

Calls 4

floodFillFunction · 0.85
fromOpenCVMethod · 0.80
flipHMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected