MehdiNoroozi/JigsawPuzzleSolver

What does color_proj do?

Closed this issue · 1 comments

Hi Mehdi,

thanks for updating the code. Can you explain what the following piece of code does?

if(color_proj)
{
for( int i = 0; i < patch_size_*patch_size_; i++ )
{
float r = r_ptr[i];
float g = g_ptr[i];
float b = b_ptr[i];

             r_ptr[i] = 0.8333*r  + 0.3333*g + -0.1667*b;
             g_ptr[i] = 0.3333*r  + 0.3333*g + 0.3333*b;
             b_ptr[i] = -0.1667*r + 0.3333*g + 0.8333*b;
     }

}

Thanks,
Biagio

Hi Biagio,

It performs color projection in the same way as is done in the context paper:
https://arxiv.org/abs/1505.05192

To summarize, let a = [-1,2,-1] . We define B = I - a^Ta/(aa^T). The projection multiplies every rgb pixel values by B.

I'll upload the new paper and all the trained models very soon.

Best,
-Mehdi