Closed zvezdochiot closed 4 years ago
https://github.com/ZQPei/patchmatch_inpainting/blob/0bea9c6c62f1347841fd903d45bebbe2d8e2388e/source/main.cpp#L63-L65
Maybe?:
int ** mask = (int **)calloc(int(height), sizeof(int*)); for (int i = 0; i < height; i++) mask[i] = (int *)calloc(int(width), sizeof(int));
See: https://github.com/ZQPei/patchmatch_inpainting/blob/0bea9c6c62f1347841fd903d45bebbe2d8e2388e/source/main.cpp#L127-L130
I think you are probably right. The images I use are square, so I did not see this bug.
Testing https://github.com/ZQPei/patchmatch_inpainting/tree/master/image_files/forest
Fixed. :)
https://github.com/ZQPei/patchmatch_inpainting/blob/0bea9c6c62f1347841fd903d45bebbe2d8e2388e/source/main.cpp#L63-L65
Maybe?:
See: https://github.com/ZQPei/patchmatch_inpainting/blob/0bea9c6c62f1347841fd903d45bebbe2d8e2388e/source/main.cpp#L127-L130