Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The results of running the Demo are different from the original paper #3

Closed
Wangyouai opened this issue Feb 8, 2022 · 1 comment
Closed

Comments

@Wangyouai
Copy link

Wangyouai commented Feb 8, 2022

Hi Prof. Smith,
Thank you so much for open-sourcing this excellent work, I recently ran your demo and noticed a gap between the results and the results in your paper:

PaperImg MyResult

Here is the detailed code I ran

load sampleData.mat
[ rho_est,phi_est,Iun_est ] = PolarisationImage( images,angles,mask,'linear' );
n = 1.5;

theta_est= rho_diffuse(rho_est,n);
theta_est_combined=theta_est;
theta_s = rho_spec(rho_est(spec),n);
theta_est_combined(spec)=theta_s;
phi_est_combined = phi_est;
phi_est_combined(spec)=mod(phi_est(spec)+pi/2,pi);

% Estimate light source direction from diffuse pixels (note that you might
s = [2 0 7]';
[ s,T,B ] = findLight( theta_est,phi_est,Iun_est,mask&~spec,3,s );

% Compute boundary prior azimuth angles and weight
[ azi,Bdist ] = boundaryPrior( mask );

% Run linear height from polarisation
[ height ] = HfPol( theta_est_combined,min(1,Iun_est),phi_est_combined,s,mask,false,spec );

% Visualise
figure;
surf(height,'EdgeColor','none','FaceColor',[0 0 1],'FaceLighting','gouraud','AmbientStrength',0,'DiffuseStrength',1); axis equal; light

Can you help me, thanks a lot

@Wangyouai Wangyouai changed the title Running the demo cannot restore the results of the paper The results of running the Demo are different from the original paper Feb 8, 2022
@Wangyouai
Copy link
Author

Thanks to the author's help, here you only need to add boundary conditions and change the direction of the rendering light source, you can get the ideal result, the code is as follows:
[ azi,Bdist ] = boundaryPrior( mask );
[ height ] = HfPol( theta_est,min(1,Iun_est),phi_est,s,mask,false,spec,azi,Bdist);
light('Position',[1 1 1]
result:
2022-02-11 22-21-09屏幕截图

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant