dylanswiggett / image-matting

7 stars 3 forks source link

Segementation fault #2

Open Rnandani opened 7 years ago

Rnandani commented 7 years ago

I am trying to implement code for soft matting. For the implementation, i am using original image and its sparse map(edge map) as shown- image sparse_map I am getting segmentation fault. What could be the possible reason? For Matting, r u using scribble based image or trimap?

dylanswiggett commented 7 years ago

Hi Rnandani,

I'm afraid I've got no idea what might be causing your segfault. This implementation is scribble based. It's also leftover from an old college project, so I wouldn't recommend using the code directly if you care about speed and stability!

Dylan

On Thu, Oct 13, 2016, 12:10 AM Rnandani notifications@github.com wrote:

I am trying to implement code for soft matting. For the implementation, i am using original image and its sparse map(edge map) as shown- [image: image] https://cloud.githubusercontent.com/assets/12201878/19339562/c1e6d8f0-9141-11e6-9a7a-09dc30319840.jpg [image: sparse_map] https://cloud.githubusercontent.com/assets/12201878/19339563/c1e7017c-9141-11e6-92d2-03158048a356.jpg I am getting segmentation fault. What could be the possible reason? For Matting, r u using scribble based image or trimap?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dylanswiggett/image-matting/issues/2, or mute the thread https://github.com/notifications/unsubscribe-auth/ABU3DSir0Ae1iF832nd2gpuL1VdK0AkIks5qzdlUgaJpZM4KVjiV .

Mathux commented 5 years ago

Hi Rnandani, I know it is a little bit too late but I think I have the answer. I had the same segfault error and after debugging for a while, I figured out that problem was caused by the function to load an image : SDL_LoadBMP which can only load BMP. To be more general, I changed it with IMG_Load; you have to install SDL_image and import it (#include "SDL/SDL_image.h")