> On Thu, May 24, 2012 at 12:37 AM, Jeremy Selan <jeremy.se...@gmail.com> > wrote: >> I'd also love to get people's input on whether this should be a required >> or optional dependency. My gut says to make this an optional dependency, as >> it isnt really a 'core' oiio feature, and I'd hate to prevent someone from >> building OIIO due to a missing Sparse Linear Solver. I think it's the right choice.
>> I forget, have you already implemented this before? (perhaps in C#, if I >> remember correctly). May we see that code? (even if it's rough, I'm still >> interested). Yes, I have implemented it. I will send you my code on private email. >> I still very much want to explore the "intermediate gradient domain >> result" as images before we lock down the external API. >> >> Łukasz - do you understand what I'm going for here? If not, I'm happy to >> describe the idea more. If so, any ideas on if it could be possible? I'm not quite sure, please describe it more. >> Independent of API, could you sketch out the high-level psuedo-code for >> what a simple gradient domain composite looks like? You need to solve a >> sparse linear system... I'm curious how all the components hook up. Instead of it It would be much easier for me to implement it, then you can see the idea how it works and if there will be any suggestions I will restructure the code. But in short steps I can show you the general work flow for smooth image completion //STEP 1 First we need to build mapping for pixels that are masked - we need to know position in order of every masked pixel located at position x,y //STEP 2 We build the sparse linear system to solve. The general equation we need to solve is: f(x+1, y) + f(x-1,y) + f(x, y+1) + f(x, y-1) - 4*f(x,y) = 0 But from the boundary conditions we know some pixel, these pixel we put on the right side and the we have for example: f(x-1,y) + f(x, y+1) + f(x, y-1) - 4*f(x,y) = -f(x+1, y) So the general sparse system we need to solve is: A*X=B where A = 1 1 -4 1 1 0 0 0 0........0 0 1 1 -4 1 1 0 0 0 .......0 0 0 1 1 -4 1 1 0 0........0 . . . . X = x1, x2 ........... xn B = 0 0 b1 0 0 b3 ........ 0 b(n-32) 0 0 //STEP 3 We generate output image including the values given from the solver. I hope it's a little bit more clear for you. About sparse linear system solver choice. Do you have any suggestions? _______________________________________________ Oiio-dev mailing list Oiio-dev@lists.openimageio.org http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org