Skip to content

Contrib XPhoto Inpaint: Segmentation fault using FSR algorithms (fast or best) #3152

@danopdev

Description

@danopdev
System information (version)
  • OpenCV => 4.5.5 (but found in previous versions too)
  • Operating System / Platform => Linux 64 Bit
  • Compiler => gcc 9.3.0
Detailed description

I used the sticker to create a panorama and I tried to fill the resulting black areas using the inpaint algoritms from contrib/xphoto.
The application crashed.

Steps to reproduce

This is the source code that does only the inpaint part.

   #include <opencv2/core.hpp>
   #include <opencv2/imgcodecs.hpp>
   #include <opencv2/highgui.hpp>
   #include <opencv2/photo.hpp>
   #include <opencv2/xphoto/inpainting.hpp>
   
   using namespace cv;
   using namespace std;
   
   int main() {
       Mat photo = imread("test.png");
       Mat mask = imread("mask.png", IMREAD_GRAYSCALE); 
       Mat output;
    
       xphoto::inpaint(photo, mask, output, cv::xphoto::INPAINT_FSR_FAST);
       imwrite("output.png", output);
   
       return 0;
   }
Issue submission checklist
  • [ x ] I report the issue, it's not a question
  • [ x ] I checked the problem with documentation, FAQ, open issues,
    forum.opencv.org, Stack Overflow, etc and have not found any solution
  • [ x ] I updated to the latest OpenCV version and the issue is still there
  • [ x ] There is reproducer code and related data files: videos, images, onnx, etc

mask
test

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions