You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I believe there is an indexing error in the shadow generation. The for loop in simOptical.py line 206 iterates variable s from 1 to num_step and retrieves values from the shadow_table at position s:
forsinrange(1,num_step):
cur_x=int(cx_origin+pr.shadow_step*s*ct)
cur_y=int(cy_origin+pr.shadow_step*s*st)
# check boundary of the image and height's differenceifcur_x>=0andcur_x<psp.wandcur_y>=0andcur_y<psp.handheightMap[cy_origin,cx_origin] >heightMap[cur_y,cur_x]:
frame[cur_y,cur_x] =np.minimum(frame[cur_y,cur_x],v[s])
However, this means that v[0] is never used. Looking at generateShadowMasks.py, it seems to me as if for s = 1, v[0] should be retrieved instead of v[1]. Hence, I think this code should be:
forsinrange(num_step):
cur_x=int(cx_origin+pr.shadow_step* (s+1) *ct)
cur_y=int(cy_origin+pr.shadow_step* (s+1) *st)
# check boundary of the image and height's differenceifcur_x>=0andcur_x<psp.wandcur_y>=0andcur_y<psp.handheightMap[cy_origin,cx_origin] >heightMap[cur_y,cur_x]:
frame[cur_y,cur_x] =np.minimum(frame[cur_y,cur_x],v[s])
Best,
Tim
The text was updated successfully, but these errors were encountered:
Hi,
I believe there is an indexing error in the shadow generation. The for loop in simOptical.py line 206 iterates variable
s
from 1 tonum_step
and retrieves values from the shadow_table at positions
:However, this means that
v[0]
is never used. Looking at generateShadowMasks.py, it seems to me as if for s = 1,v[0]
should be retrieved instead ofv[1]
. Hence, I think this code should be:Best,
Tim
The text was updated successfully, but these errors were encountered: