darrenlafreniere / lafarren-image-completer

Implementation of the research titled: "Image Completion Using Efficient Belief Propagation via Priority Scheduling and Dynamic Pruning"
http://www.lafarren.com/image-completer/
GNU General Public License v3.0
32 stars 18 forks source link

Add a check to ensure there are some known pixels #49

Open daviddoria opened 13 years ago

daviddoria commented 13 years ago

When my mask reader was broken I found this bug. If the mask has 0 pixels, the program crashes with a confusing assert. There should be a check to ensure the mask does not specify that the entire image is unknown.

darrenlafreniere commented 13 years ago

Agreed.

daviddoria commented 13 years ago

Ok, I'll add Validate() to the interface once the merges catch up. Assign this one to me. (I found out that I can't assign things myself because I am not a "Collaborator" on the repository).

darrenlafreniere commented 13 years ago

Add a new enum to LfnIc.h:

enum CompletionResult { CompletionSucceeded, CompletionFailedOutputIsInvalid, CompletionFailedInputHasNoKnownData, };

and have Complete return the correct enum value.

daviddoria commented 13 years ago

Will do. While I'm looking at the Complete function - what is the empty { } from 188 to 250 of LfnIc.cpp for?

darrenlafreniere commented 13 years ago

Just for scoping. There used to be more code before and after that block.