   Appearance-Space Texture Synthesis
  Hello,I managed to compute the 8D-PCA-Vector out of the 75D-Appearance-Vector mentioned in this thread: http://www.gamedev.net/community/forums/topic.asp?topic_id=451335Jitter and upsampling works pretty fine, too.My problem is the correction step according to the neighborhood appearance by using neighborhood matching. I can't find any explanation on the internet how exactly neighborhood matching works. Currently I take four neighbors of each pixel and compare their neighborhood appearance to the current pixel's neighborhood appearance by computing the difference of each component of the vectors and dotting the vectors to a single scalar. The neighbor texture coordinate with the biggest value is taken to align the new texcoord for the current pixel. The results are not very convincing.Does someone know how to achieve efficient (real) neighborhood matching?   
  bump   ;  Why are you dotting the vectors to a single scalar? The standard distance formula works well for this equation.Are you pre-computing the K-Nearest neighbors as the paper discusses? If so, then you should have an exact list of locations in the source texture that are 'closest' to a given pixel value. Your correction step should be calculating the current neighborhood, and replacing the current pixel with the one who's KNN is most similar to the current one (simple distance formula works fine here)~Main   ;  Thanks for your answer.You are right I meant square distance by the dotted vectors. It is computed by the difference of each element and the scalar product of the resulting vector with itself.delta = myPixelNeigborhoodAppearance - neighborPixelNeigborhoodAppearance;squaredDistance = dot( delta, delta );That is ok, isn't it?Your suggestion for taking the minimum difference in neighborhood appearance is interesting. Currently I adapt to the neighbor with the biggest discrepancy.I will try that.Thanks,Richard;  wow, I switched the compare method from lt to gt and the starting value of the squareErrorThreshold to something huge and it works quite good, now.Thank you, you are my hero.