charlesq34 / pointnet

PointNet: Deep Learning on Point Sets for 3D Classification and Segmentation
Other
4.73k stars 1.45k forks source link

Bitwise operation on data #78

Closed evagap closed 6 years ago

evagap commented 6 years ago

Hello Charles,

I have a question on the "sem-segm" part of the code. Why do you use bitwise operations to find the number of points in each block?

Thank you very much for your time.

charlesq34 commented 6 years ago

Hi @evagap , sorry for the late response, could you refer to the code line number?

evagap commented 6 years ago

Hello @charlesq34 , it is the "indoor3d_util" file under the ""sem_segm" part and more specifically lines 196-198. I attach them here as well: xcond = (data[:,0]<=xbeg+block_size) & (data[:,0]>=xbeg) ycond = (data[:,1]<=ybeg+block_size) & (data[:,1]>=ybeg) cond = xcond & ycond

Thank you for your time

charlesq34 commented 6 years ago

Hi @evagap

data is a N by 6 array, so data[:,0] is an 1D array, thus after bitwise AND operations, cond is also an 1D array of True and False. Taking the sum of cond results in the number of points satisfying our conditions.

Hope it helps.

evagap commented 6 years ago

Thank you! It is helpful!